winter icon indicating copy to clipboard operation
winter copied to clipboard

Remove importance="high"

Open AIC-BV opened this issue 2 years ago • 10 comments

This property does not exist (anymore?)

AIC-BV avatar Nov 28 '23 15:11 AIC-BV

It was originally added in https://github.com/octobercms/october/pull/4285 and it looks like there's one other place where it might still be present in the codebase, could you take a look?

Looks like the spec was renamed and adjusted since then and now exists as Fetch Priority. Would you be willing to take a look at that and make any necessary adjustments to retain the original intention of the PR while following the newest standard?

LukeTowers avatar Nov 30 '23 19:11 LukeTowers

@LukeTowers I added fetchpriority how I interpreted it. I opened a really large order which takes around 4 seconds to load according to the network tab. Using the modified code, it took significantly shorter: 2.5 seconds to load. Don't know if it is coincidence or not.

BUT I kept getting the 'invalid security token' error very often while refreshing so this definitly needs some investigation of the maintainers to optimise this PR.

AIC-BV avatar Dec 01 '23 09:12 AIC-BV

Also low support https://caniuse.com/?search=fetchpriority

AIC-BV avatar Dec 01 '23 15:12 AIC-BV

Some thoughts on this:

  • async attribute on scripts will introduce issues with loading scripts out of order on some browsers. This will cause issues for some widgets that need to load base scripts before others, such as the Inspector and Media finder.
  • The best way of loading scripts in way that prevents stalling still remains loading them just before the closing </body> tag. I recall the only reason we haven't done that is because some widgets (and possibly user plguins) load JavaScript inline that requires certain scripts to be available immediately.
  • My understanding is that we can use rel="preload" for all stylesheets without the need for the rel="stylesheet" line before it for all browsers now.

bennothommo avatar Dec 06 '23 00:12 bennothommo

Must've done something wrong since its broken now 😅

AIC-BV avatar Dec 07 '23 13:12 AIC-BV

Should work fine https://caniuse.com/?search=preload

AIC-BV avatar Dec 07 '23 13:12 AIC-BV