Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery library download - stored in browser cache?

Tags:

jquery

If I keep reloading a page that uses jquery from google hosted site. Does that mean it will always redownload the library? Or does the browser know not to, since it previously downloaded it.

like image 484
airnet Avatar asked Aug 17 '11 18:08

airnet


2 Answers

Most modern browsers know not to download that. Check jQuery CDN in console and you see this.

304 Not modified.

That means the library is being loaded from cache.

like image 173
naveen Avatar answered Nov 03 '22 05:11

naveen


What you are talking about is a CDN. Typically no, it won't redownload it, and if developers from other sites also use the same CDN, then it may already be in cache even before they get to your website.

like image 3
vcsjones Avatar answered Nov 03 '22 03:11

vcsjones