Skip to content

Instantly share code, notes, and snippets.

@codamadev
codamadev / cache.md
Last active August 7, 2023 13:54
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