I worked with a friend to show how to change a stylesheet on her web site. After making the change, she emailed that even after reloading, the page still looked as it had before.
If you’ve ever made a change to your web site, then reloaded and not seen the change, read on.
Reload Like You Mean It
When you reload a web page, you’re not necessarily getting all of the latest files. Web browsers cache, or temporarily save, certain kinds of files in order to make the web site seem to load faster.
A cache is sort of like your pantry. You buy items from the source (the supermarket) then store them in the pantry for easy access. If the supermarket comes out with an updated flavor of potato chips, your pantry will still have the old kind. It’s more convenient than going to the store every time you want some chips, but you won’t always have the latest flavors.
Hopefully my pantry metaphor makes caching easier to understand rather than more confusing :)
Caching usually does what you want when you’re browsing the web. But when you’re making changes, the web browsers caching gets in the way. To solve the problem, press and hold the
Shift key, then press the reload button.
Holding the shift key down lets your browser know to bypass the cache and download the file from the server again. Shift-Reload is like going back to the supermarket when your potato chips are past their expiration date.
Shift-Reload will often work, especially if you changed an image or a stylesheet, and it’s the first thing to try. However, it won’t always solve the problem.
Other methods to try
When Shift-Reload hasn’t solved the problem, try these other methods:
- Clear the web browser’s cache in your browser
- Restart your web browser
- Load the page in another web browser (some browsers stubbornly refused to bypass the cache)
- Make sure you changed the right file
- Double-check that you saved the file before reloading
I can personally attest to having wondered why a change wasn’t showing up, only to discover I hadn’t saved the file.