-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update to jQuery 3.3.1 #206
Comments
Would you be able to submit a PR for this? If you do, please give a URL to where you obtained jquery from. Preferably a link to a specific version, not just 'latest'. This is so I can validate the file hasn't been modified before merging 👍 |
Sure thing. I'll do that shortly. I was thinking of suggesting that we load jQuery from a CDN with a local fallback - like HTML5Boilerplate recommends. It'd be like this:
REF: https://github.com/h5bp/html5-boilerplate/blob/6.1.0/dist/index.html What do you think? |
I like the idea of using CDN but I remember having a conversation about this with @matcornic in the past... he wanted the site to remain functional even in an "internal" or "offline" network. This option of trying CDN and then falling back could work. We should check whether there's a noticeable delay while an 'offline' client fails or times out reaching the CDN. Also it would make sense to apply this change to all libraries loaded by the theme which are available via a CDN. |
The option for using CDN first with a local fallback for jQuery is simple to implement and doesn't impact performance even when running without Internet access. You can test how it works by blocking access to the CDN with Chrome dev tools. There isn't such an option for the other JS scripts to detect if CDN is available if not fallback to locally hosted. I think doing this CDN-first approach just for jQuery is fine. |
Great - thanks for confirming @matcornic - I'll open a PR shortly. |
@coliff Is there any progress on this? |
This is dealt with PR #237 which I hope will be merged. |
Closed by #237 |
It'd be good to update to jQuery 3.3.1. jQuery 2.x is no longer supported and has some XSS issues (https://snyk.io/test/npm/jquery/2.2.4)
I've tested this theme with jQuery 3.3.1 and it works correctly.
The text was updated successfully, but these errors were encountered: