Need to Clear Your Cache? Here’s How

March 6, 2015

Browser caches are useful for web browsing, but a real pain point for developers. Modern-day browsers cache front-end resources like JavaScript or CSS style sheets. They primarily do this to increase the website performance. This can be irritating though for those working in development mode and constantly modifying the JavaScript or CSS style sheets. The […]

Browser caches are useful for web browsing, but a real pain point for developers.

Modern-day browsers cache front-end resources like JavaScript or CSS style sheets. They primarily do this to increase the website performance. This can be irritating though for those working in development mode and constantly modifying the JavaScript or CSS style sheets. The only way to see these changes is by doing a hard refresh or clearing the cache of the browser.

hard refresh is a way of clearing the browser's cache for a specific page, to force it to load the most recent version of a page. Sometimes, when changes are made to the website, they don't register immediately due to caching. A hard refresh will usually fix this, though occasionally completely clearing the cache is necessary.

How to Hard Refresh in Various Browsers

Chrome:

A hard refresh in Chrome can be done by using the following short cut keys:

Windows/Linux:

  1. Hold down Ctrl and click the Reload button (or hold down Ctrl and press F5).
  2. Open the Chrome Dev Tools by pressing F12. Once the tools are open, right click on the refresh button and a menu will drop down. This menu gives you the option of doing a hard refresh, or even clearing the cache and doing a hard refresh automatically. The latter enables you to empty your cache and reload Chrome.

Mac:

  1. Hold ⇧ Shift and click the Reload button.
  2. Or hold down ⌘ Cmd and ⇧ Shift key and then press R.

Mozilla Firefox:

Windows/Linux:

  1. Hold the Ctrl key and press the F5 key.
  2. Or hold down Ctrl and ⇧ Shift and then press R.

Mac:

  1. Hold down the ⇧ Shift and click the Reload button.
  2. Or hold down ⌘ Cmd and ⇧ Shift and then press R.

Internet Explorer:

Windows and Mac:

  1. Hold the Ctrl key and press the F5 key.
  2. Or hold the Ctrl key and click the Refresh button.

Edge:

  1. Open the Microsoft Edge Developer Tools by pressing F12. Once the tools are open, right click on the refresh button and a menu will drop down. This menu gives you the option of doing a hard refresh, or even clearing the cache and doing a hard refresh automatically.

Hard Refresh Frequently Asked Questions (FAQs)

How do I force refresh my browser?

Different operating systems and browsers use different commands and shortcuts. For Windows in Chrome or Edge, the keyboard shortcut Ctrl + F5 (or Ctrl + Reload) refreshes. For Mac, hold Cmd+Shift+R or Shift+Reload. Most browsers also have a refresh button next to the URL.

What is Ctrl F5?

Ctrl + F5 is the shortcut to trigger a refresh, which will force the page to reload. To make the browser refresh without relying on the cache, use Shift + Ctrl + F5. This triggers a “hard refresh”, so the browser pulls up the newest version of a web page.

How do I hard refresh Safari?

Safari is easy to refresh.

Safari for Mac: Simply right-click on “Safari” at the top left of the screen and select “Empty Cache”. Confirm your choice, then reload the page.

Safari for Windows: Click the “Alt” key to reveal the menu bar. Select “Edit” – “Empty Cache”. Then confirm selection.

Does a hard refresh clear cookies?

A hard refresh forces a page to reload without relying on the cache. It does not clear the cache or the cookies. To do so, you must go through the Control Panel’s Internet Options (or Safari’s Preferences), then select the option to delete Browsing History or Website Data, including cookies.

How do I hard refresh a website?

Ctrl + R is considered a soft refresh that reloads the page from the cache. A hard refresh ignores the cache and requests a new set of pages from the server, which ensures any updates are reflected. To do a hard refresh, press Shift + Ctrl + R.

How do I clear cache and hardly reload Chrome?

Access Chrome Developer Tools by clicking F12. After accessing these tools, right-click on the refresh button and you will get a dropdown menu. There you get the option of choosing a hard refresh or clearing the cache and doing a hard refresh automatically.

How do I refresh my cache?

If you run a hard refresh and see that pages are showing new information, it’s wise to clear your cache. You can do this by navigating to the Control Panel—>Internet Options/Settings –> General Tab – >Browsing History.

Then select the delete or settings button.

Why should I clear my cache?

Browsers cache front-end resources to improve website performance such as HTML, JavaScript, CSS, and images. However, the cache may not reflect the most recent version of a web page. Clearing the cache prompts your browser to pull a fresh record for the web page.

Are JavaScript files cached?

Most modern browsers do cache JavaScript files. This is standard practice for browsers as it ensures an optimized loading experience. Cached items such as JavaScript will usually be served from the browser's cache instead of making another request for a resource that has already been retrieved.

How do I force JavaScript to refresh a cache?

To refresh a cache, use Ctrl + F5. You can also do a hard refresh using Shift + Ctrl + F5. Apple users replace Ctrl with Cmd. Linux just needs F5.

The cache can also be cleared manually through the Control Panel or Preferences Menu->Internet Settings/Options->Clear Browsing History/Website Data

Blog was originally published in March 2015, updated in November 2023.

By Team FileCloud