The original jQuery version, 1. Over the next 10 years jQuery saw 12 'minor' version updates to the v1 branch. When you use a 3rd party dependency like jQuery you should make an effort to stay as current as possible. There is having access to new features, but you also get bug fixes and security holes patched. The news gets even worse, w3Techs goes on to report the most popular version is 1. There is no one single answer to this question as most sites will have more than one reason.
Generally it is because a site feature is working and no one has paid attention to it in a while. Often it comes down to third party dependencies, like SAAS scripts and platform plugins and themes. The later is very problematic in the WordPress ecosystem.
Many WordPress plugins are less than production quality. They are developed on the cheap without what I would call product quality testing applied. Since many developers hired to create these plugins don't keep up with modern web technology they just use what they were taught 10 years ago, which is jQuery version 1.
Much of the code in these dependencies is not actually developed, but rather copied, pasted and slightly tweaked. This means the developer finds something similar to what they are doing, clones the code and then makes minor modifications to the code.
They just want to get the task done and unless you add a current version requirement they don't bother updating and testing against the latest. If you have commissioned a component or plugin or any development for that matter I reccomend specifying the use of native web APIs over libraries and frameworks as these will stay current and run more efficiently. Plus you will always be current as long as your visitor has an updated browser, which today is almost always. The proliferation of jQuery 1.
This is the neglect of production software over the years as standards and native functionality improves around the software. The failure to periodically audit and update means your software is not keeping up and will eventually break and of course lose to competition that is staying current.
For some this might cause issues if you lean on older plugins and 3rd party plugins as they may depend on deprecated or updated functionaltiy. Because most jQuery plugins are open source you can just dive in and update the code.
This of course makes the code yours, which in the long run is better in most cases. The reason you want to own the plugin code will come down to a single litmus test, does the plugin owner maintain the code? In most cases the answer is no. It is actually a big problem in the open source world today as so many projects have simply been abandoned because the owner had no financial incentive to continue to maintain the code.
Companies like Infragistics are in the business of making professional user interface components that not only make developers productive, but offer the support businesses need. Because they have a financial stake in the products they have the incentive and means to maintain and update these components. Before you update to the latest jQuery version you should perform a full dependency audit.
Determine where plugins and other code potentially breaks. You will also need to audit any 3rd party plugins, especially in the WordPress ecosystem as many of these plugins carelessly inject a version of jQuery you don't want. If you don't know if you do not know if your site is using jQuery or what version there is a simple code snippet you can run from your browser's console.
This opens the developer tools. The console tab should be the 2nd tab, if not locate it from the list. You may need to expand the list of tabs at the end to see all tabs. The code first verifies jQuery exists. If jQuery is present it will then echo the value of the jQuery version. In this example the site they are using an outdated version, 1. If jQuery is not present nothing is written to the console.
As I stated web standards used this as a reference to define new standards. These are some of those features in native JavaScript. The simplest 'catch all' native selector methods are document. The different between the two is the first one returns a single node, the second a nodeList or array of nodes. Between and , the community provided a variety of new official and unofficial themes and plugins, interoperability and other bug fixes, robust testing processes, and support for multiple versions of jQuery.
In that timeframe, the jQuery community had helped inspire dozens of other open source projects, pattern and component libraries.
But newer CSS frameworks and approaches were taking hold, and slowly the community moved on to other projects. The UI team and jQuery Mobile teams merged, and the group focused more on maintenance and compatibility with jQuery Core. The scope of the project and the inclusiveness of the community was responsible for helping countless web makers develop a love and appreciation for user experience, localization, internationalization, accessibility, and clean, reusable code.
Additional gratitude is owed to Micha? OpenJS Foundation will forever be grateful for the work of these open source developers and the impact they had on the ecosystem through their work. Please join us in celebrating these developers and jQuery UI!
As part of its ongoing infrastructure updates, the jQuery infrastructure team is making configuration and deployment changes to address intermittent outages reported by some users. The issue is the result of faulty IP allowlisting which affects users downloading jQuery project assets from certain IP addresses.
This issue is expected to be resolved in the next few weeks. In the interim, users can mitigate the issue by downloading and serving the files they need. CDN migration is part of a package of infrastructure improvement projects the project has been undertaking this year. The infrastructure team plans to provide a full overview of these improvements, which will help support the long-term maintenance of jQuery and its related projects, later this summer. While many sites host jQuery locally, others rely upon the jQuery CDN to deliver the library on demand.
On average, the jQuery CDN delivers over 2 petabytes of code per month. The project is hosted at the OpenJS Foundation, the vendor-neutral organization to grow and sustain the JavaScript and web ecosystem.
In jQuery 3. This release does not include a security fix, but does have some good bug fixes and improvements. We still have our eyes on a jQuery 4. As usual, the release is available on our cdn and the npm package manager. Here are the highlights for jQuery 3. You may have guessed from the minor version that a feature snuck into this release.
In previous versions, when a JSONP request responded with an error, often the response was still an executable script. Normal scripts will still be skipped when an error is encountered. See gh for more information. One bug worth highlighting has to do with redirecting focus to another element in a focus handler.
Take this example where a focus handler is triggered inside another focus handler:. Due to their synchronous nature everywhere outside of IE, a fix added in 3.
While the code continues to leverage native focus and blur events, we were able to fix this by aligning even more with native methods and only propagating the last focus event up the DOM tree.
Other bug fixes and improvements include a fix for retrieving dimensions on table rows in Firefox , a fix for a crash in Chrome when a focusout event was triggered on a removed element , several improvements to some tests, and more.
Aside from the change to no longer ensure XHTML-compliant tags for you, we do not expect other compatibility issues when upgrading from a jQuery 3. To upgrade, have a look at the new 3. The jQuery Migrate plugin will help you to identify compatibility issues in your code. Please try out this new release and let us know about any issues you experienced. And often it is simpler to use a combination of CSS and class manipulation for web animations.
The size of jQuery is very rarely a load performance concern these days, but the slim build is about 6k gzipped bytes smaller than the regular version. These files are also available in the npm package and on the CDN:. These updates are already available as the current versions on npm and Bower.
Public CDNs receive their copies today, please give them a few days to post the files. Thank you to all of you who participated in this release by submitting patches, reporting bugs, or testing, including Dallas Fraser , Michal Golebiowski-Owczarek , Wonseop Kim , Wonhyoung Park , Beatriz Rezener , Natalia Sroka , and the whole jQuery team. Full changelog: 3. A short time ago in a galaxy exactly like this one, we released jQuery 3. We have a quick fix for a regression in that release.
Specifically, we had changed our internal data object to use Object. We did that to prevent collisions with keys on Object. However, this also meant that users especially plugins could no longer check what was in jQuery data with the native.
This change is the only code change in this release. Other changes include some minor updates to our docs and build system. Security advisories for both of these issues have been published on GitHub.
While we provided all of the details on the first issue in the jQuery 3. The second issue was very similar to the first. Our fix is to only apply this code where it is needed.
Fortunately, because of the different parsing behavior in IE9, we can keep the fix in IE9 without exposing it to the same vulnerability as other browsers. Please upgrade when you get a chance to avoid these vulnerabilities. Also, the jQuery Migrate plugin will help you to identify compatibility issues in your code.
Thank you to all of you who participated in this release by submitting patches, reporting bugs, or testing, including Pierre Grimaud , Michal Golebiowski-Owczarek , Ed S , vanillajonathan , and the whole jQuery team. With a virus ravaging the planet, we realize that jQuery may not be a high priority for you or the sites you manage.
When you do have a moment, we recommend that you review this new version and upgrade. Recently, an issue was reported that demonstrated the regex could introduce a cross-site scripting XSS vulnerability. The jQuery team agreed it was necessary to fix this in a minor release, even though some code relies on the previous behavior and may break.
The jQuery. If you absolutely need the old behavior, using the latest version of the jQuery migrate plugin provides a function to restore the old jQuery. After including the plugin you can call jQuery. For more details, please see the 3. Using libraries like these is generally more lightweight than loading the entirety of jQuery for just a bit of its functionality. I think the best justification for using jQuery is that it provides comprehensive functionality for powering the front end of a website.
Instead of having to learn all the various native APIs or special-purpose libraries, you can read just the jQuery documentation and immediately be productive. Another use case emerges when you must support old versions of IE. In that case, jQuery serves as well as it did when IE was the dominant browser. It has helped a generation of developers make websites that work on every browser.
While it has been supplanted in many respects by new libraries, frameworks, and paradigms, jQuery played a huge, positive role in making the web what it is today. Barring a significant change in jQuery functionality, it seems likely that jQuery will continue to experience a slow but steady decline in usage in the next several years.
New websites tend to be built from the beginning with more modern frameworks, and the good use cases for jQuery are becoming rarer. Some people are unhappy with the rate of churn in web development tooling, but to me, that is a sign of rapid progress.
Its successors have done the same. Debugging code is always a tedious task. But the more you understand your errors the easier it is to fix them. LogRocket allows you to understand these errors in new and unique ways. Our frontend monitoring solution tracks user engagement with your JavaScript frontends to give you the ability to find out exactly what the user did that led to an error. Understanding the impact of your JavaScript code will never be easier!
Great read! As a newbie, I was wondering about this. Thanks for the history lesson as well! You forgot to mention another scenario for When to Use jQuery. And this still happens to me from time to time, when you want to use some JavaScript library that depends on jQuery, as quite a few of them still do.
I am beginning to see a trend where the maintainers of these libraries are doing complete rewrites to remove jQuery dependency, just as Bootstrap is doing with v5. Just this week I went to use a popular formvalidation that I have used in the past, and upon navigating to the website, it was clear that things were different. After further inspection, I realized that they completely removed jQuery as a dependency. Good article! Reply 3.
0コメント