Here's how... When you're in Google Chrome, click on View, then select Developer, then Developer Tools. Alternatively, you can right click on a page in Chrome, then click Inspect. Click on the Network tab, then check the box to Disable cache.
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.
Open Google Chrome and navigate to the page you want to test. Press F12 or open developer tools from within Chrome's settings (Settings > More tools > Developer tools). Click the cog in the top right of the pop-out box. Check the "Disable Cache (while DevTools is open)" setting box.
You can click the settings icon on top right corner ...
| More Tools | Developer Tools | Network | Disable cache (while DevTools is open)
For windows, this is F12 or CTRL + SHIFT + I while on mac CMD + SHIFT + I opens up DevTools.
New path for Chrome Update Sept 2018:
Click settings icon on the top right corner ...
| Settings | Preferences | Developer Tools | Network | Disable cache (while DevTools is open)
A faster way to do this is by right clicking the refresh icon beside the address bar and choosing Empty Cache and Hard reload
Just make sure Chrome's dev tools is open. (Press F12) By the way... This trick only works on Chrome for Windows, Ubuntu, and Mac OS
Hold Shift while clicking the reload button (F5).
This forces the web browser to ignore the cached content and pull a new copy of the web page into the browser. Shift + F5 guarantees that the latest website content will be loaded. However, depending on the page size, it is usually slower than only F5.
add Something like script.js?a=[random Number]
with the Random number generated by PHP.
Have you tried expire=0, the pragma "no-cache" and "cache-control=NO-CACHE"? (I dunno what they say about Scripts).
A few ideas:
HEAD
command instead of a full GET to see if it needs to download the full file again, and the server uses the timestamp to see.If you want to disable caching on your server, you can do something like:
Header set Expires "Thu, 19 Nov 1981 08:52:00 GM"
Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
Header set Pragma "no-cache"
In .htaccess
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