How to clear the browser cache for a page
When the JavaScript file or CSS style sheets have changed in our development, we need to hard refresh the page to flush the browser cache of the page so that we can get the latest version of the page.
How to hard refresh?
Chrome, Firefox, ...
- Windows/Linux: Ctrl + F5
- Mac: hold down ⌘ Cmd and ⇧ Shift key and then press R (or Hold ⇧ Shift and click the Reload button besides the address bar)
Internet Explorer
- Ctrl + F5 (or hold the Ctrl key and press the Refresh button)
To be more complete ...
A hard refresh will usually flush the page cache in the browser, though occasionally completely clearing the cache is necessary.
- Open your page with Chrome, press the Ctrl + Shift + I keys (Option + Command + I if Mac);
- Then press the Refresh icon (hold it without release for about 2 seconds): it will pop up a dropdown menu shown as below:
- Click the "Empty Cache and Hard Reload".
▲