[wp-trac] [WordPress Trac] #44229: Use CDNs where possible to serve external assets like jQuery
WordPress Trac
noreply at wordpress.org
Fri May 25 16:09:22 UTC 2018
#44229: Use CDNs where possible to serve external assets like jQuery
-------------------------+------------------------------
Reporter: jacklenox | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by jacklenox):
Replying to [comment:1 superpoincare]:
> I think Wordpress' policy is to self host as much as possible. Google
Fonts is an exception in bundled themes because the most optimal way
involves doing a lot of user agent detection which is not easy to do and
maintain.
Yep, I understand. If it is the policy, I'm challenging it.
> Having jQuery load from Google or some other CDN may not be preferable
since many people use blockers such as uBlock Origin for which the expert
setting is to block third party javascript.
This is a good point. However, I suspect the vast majority of notable
WordPress websites use some form of CDN for their assets, including
JavaScript. The sort of person blocking any third party JS is probably
also the sort of person who would understand why things might behave in an
unusual way.
> There are plugins available for loading jQuery from CDN and can also be
done easily from the child theme.
Yep, I mention doing it yourself at the top of the ticket. But my focus
here is on the seismic shift that would happen if this was implemented at
a core level.
> (Incidentally Chrome doesn't like document.write, so you shouldn't use
it).
Sure, it's just a rudimentary example of a way that you could do a
fallback.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44229#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list