Which is the best method to make the browser use cached versions of js files (from the serverside)?
JavaScript and CSS files are usually cached in the browser after the first access. The browser cache is used to store web application assets like images, CSS, and JS code on your computer's hard drive.
If a user stops using the browser it is indefinitely. If he/she uses the browser rarely, it will be until the expiration - either by internal policy or by HTTP headers. If he/she uses the browser heavily, it can be 12 minutes or even less.
Have a look at Yahoo! tips: https://developer.yahoo.com/performance/rules.html#expires.
There are also tips by Google: https://developers.google.com/speed/docs/insights/LeverageBrowserCaching
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With