Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery CDN caching statistics

I'm considering dropping jQuery and replace it with vanilla js code mostly for mobile browsers.

However, I also read that most users have jQuery CDN version already cached in their browser so that they actually don't need to download it. If that is indeed the case for mobile browsers as well, it can save me a lot of code rewriting time.

Since my site is not live yet to get an indication myself, I am looking for general statistics of the estimated percentage of users who's browsers have jQuery library cached versus the users who don't. Any help will be appreciated.

like image 345
Omer Greenwald Avatar asked Mar 01 '26 01:03

Omer Greenwald


1 Answers

Well, first of all, if the user has been visiting the website which uses jQuery CDN his browser will already have the library.

Look at this statistics. That means from top 1 million websites 30,000 are using jQuery CDN.

So there is a quite high probability that the user already has visited one of these websites.

Another question is why do you need to rewrite this for mobile? jQuery file size is 84KB. It is downloaded and cached once. Your HTML probably costs even more but it is downloaded every time. Don't create problems out of nothing, go on using jQuery and spend more time on improving the really important things.

like image 145
smnbbrv Avatar answered Mar 02 '26 15:03

smnbbrv



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!