Skip to content

Instantly share code, notes, and snippets.

@codamadev
Last active August 7, 2023 13:54
Show Gist options
  • Save codamadev/327daaddda772dd6f98acfae3a23dd3d to your computer and use it in GitHub Desktop.
Save codamadev/327daaddda772dd6f98acfae3a23dd3d to your computer and use it in GitHub Desktop.
Help With Cache Issues

What is caching?

Web caching is a feature used by browsers to improve loading times for repeat visits to a website. It does this by storing a local copy of web content, which can then be loaded quickly instead of being downloaded again. However, when the website changes, the browser might show the old, cached version instead of the new one, leading to discrepancies between what you see and what the developer has updated.

Here's how to solve it:

  1. Server-side actions (if you have access to the server):

    • Clear the cache on the server.
    • Ensure the appropriate cache headers are set to control caching behavior.
  2. Open the browser (Chrome, Brave, or similar) inspection tools: Press Cmd + Option + I, or right-click on the page and select Inspect. Open browser inspection tools

  3. Once the inspection tools are open, go to the Network tab.

  4. Look for a checkbox or option labeled Disable cache. It's usually near the top of the panel or in a settings menu. Make sure this option is checked. This will disable caching ONLY while the inspection tools are open, allowing you to see the latest version of the site as it's served by the server. Disable cache

  5. With the inspection tools still open and the Disable cache option checked, long press on the refresh icon, select "Empty Cache and Hard Reload", then long press again and select "Hard Reload". Empty Cache and Hard Reload

  6. Navigate to the Application tab and click on the "Clear Site Data" button. Clear Site Data Clear Site Data button

  7. Add a URL parameter ?nocache={random string of letters and numbers} to the end of the URL. For example, if the URL is https://www.example.com/page, change it to https://www.example.com/page?nocache=pikachu. This tricks the browser into treating the URL as a unique request and not using the cached version.

  8. Sometimes, data might be cached on the router or internet provider side. To troubleshoot this, change your connection to a personal hotspot and try loading the website again.

  9. If you are still encountering issues, try using a VPN. You can add Urban VPN to your Chrome browser using this link: Urban VPN. After connecting to the VPN, visit the website again.

  10. An alternative to using a VPN is to use

an online proxy, such as Proxy Site.

  1. If the issue persists after all these steps, it may be time to reach out for technical help.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment