Developer tools·29 questions

How to clear the cache for a single site?

Answer

Clearing the cache for only one specific site is a useful procedure that allows updating outdated script, style, or image files without completely losing browser data and history on other resources. This is especially relevant during active web application development, when code changes are not displayed due to saved copies in the browser's memory.

The most reliable way to clear the data of an individual site is to use the browser's internal memory. You need to open the developer tools with the F12 key, go to the Application tab in the Google Chrome browser or the Storage section in Mozilla Firefox, and then find the Clear storage or Clear site data item and confirm the deletion.

An alternative and faster method is available directly through the standard page refresh menu. To do this, leave the developer panel open, hover the mouse cursor over the page refresh button (the circular arrow to the left of the address bar) and right-click on it.

In the appearing context menu, you need to select the bottom-most item called Empty Cache and Hard Reload. This method will instantly and forcibly make the browser re-download all resources from the server, ignoring locally saved copies.

The main condition for these methods to work is that the developer panel (DevTools) must be open at the moment of performing manipulations with the refresh button, otherwise the browser will apply the standard caching algorithm.

Was this answer helpful?

More questions in this topic

Related questions from other topics