Remove importance="high"
This property does not exist (anymore?)
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 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.
Also low support https://caniuse.com/?search=fetchpriority
Some thoughts on this:
asyncattribute 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 therel="stylesheet"line before it for all browsers now.
Must've done something wrong since its broken now 😅
Should work fine https://caniuse.com/?search=preload