-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove importance="high" #1014
Remove importance="high" #1014
Conversation
This property does not exist (anymore?)
This property does not exist (anymore?)
It was originally added in octobercms/october#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. BUT |
Also low support |
Some thoughts on this:
|
Must've done something wrong since its broken now 😅 |
Should work fine |
<?php endforeach; ?> | ||
|
||
<?php foreach ($scripts as $script): ?> | ||
<script data-cfasync="false" src="<?= $script . '?v=' . $coreBuild; ?>" importance="high"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data-cfasync
is still required AFAIK is it not? It's to prevent CloudFlare's Rocket Loader from breaking the backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem to be doing anything, nothing is broken without it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but can add if it makes it safer: https://developers.cloudflare.com/speed/optimization/content/rocket-loader/ignore-javascripts/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will break sites for people who use CloudFlare Rocket Loader, but ideally, I would like for us to not have platform-specific fixes in core code and delegate it to a plugin, if it all possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally we do handle it via a plugin (https://github.com/wintercms/wn-cloudflare-plugin/blob/main/Plugin.php#L43-L54) but these are different because they're manually included instead of going through the AssetMaker trait.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth us changing these to go through AssetMaker then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bennothommo if you feel like doing that, sure 😉
This pull request will be closed and archived in 3 days, as there has been no activity in this pull request for the last 6 months. |
👀 |
@bennothommo any thoughts on this? |
I think we can certainly remove the |
Added the data-cfasync back to the line |
This property does not exist (anymore?)