• I used to replace WordPress-shipped standard jquery.js with one at a CDN, but now I see that actually, the shipped jQuery v1.12.4 is a version marked “WordPress 2019-05-16” is different from the one at the CDN, and the minimized code also differs from regular version.

    Who knows what is the difference between those versions, and what harm might I suffer by relying on the CDN-version?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I thought the code was always different from external versions of jQuery. You can fall into pitfalls when plugins and themes are developed for a specific version of the bundled jQuery and you’re removing that version, and enquing your own. Why are you enqueing your own? I’ve not come across a need to override the WordPress jQuery bundle.

    Thread Starter eiland

    (@eiland)

    Speed? Reducing server load? Or is the benefit of (once) loading jquery.js from a CDN marginal?

    I’ve also been looking into offloading wp-include js files onto a CDN, the benefits all depends on your site load. If you plan on having thousands of users per X then offloading to a CDN is probably your best bet.

    I’m working a large multisite and offloading wp-content to a CDN is on my task list.

    I found information here; https://colorlib.com/wp/load-wordpress-jquery-from-google-library/

    In the end it seems like wp is hosting a custom version.

    https://cdnjs.com/libraries/jquery-migrate/1.4.1
    https://cdnjs.com/libraries/jquery.hoverintent/1.8.1
    https://cdnjs.com/libraries/jquery-color
    https://cdnjs.com/libraries/underscore.js/1.8.3

    Are some that i found that could be offloaded.
    On my side, i might just offload wp-includes fully to a CDN and call it a day.

    Just sync the directory to the CDN and enqueue the scripts with a proper path, that should solve all my issues.

    Ideally i’d love to use a “free” service since it would lower our cost, and in most scenarios Google/Cloudflare is wide spread so someone having 1.12.4-wp in cache is more likely.

    • This reply was modified 5 years, 3 months ago by Jon Wong.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom version of jQuery v1.12.4?’ is closed to new replies.