Browser Cache
Menu Browser Cache
 

Browser Cache

When updating pages I often find that they do not appear correctly on all my devices. This is often due to the way that different browsers handle cached files. This is particularly true with Javascipt files.

To get pages to display correctly it may be necassary to clear your browsers cache. There are ways to do this progamatically from the web page source, but looking at some of these solutions they seem to be a little over complicated for my use.

Different Browsers

Since I started out on this I have found that there s a difference in how the modern browsers still handle things such as caching. This was the case in the past for a lot more reasons.

This is particularly the case when you are trying to get external css and .js files to link when pages are viewed from the server.

My main testing regime is to develop on a Windows computer and review on Microsoft Edge. Te main reasn for this is due to the fact that Windows cmputers have Edge as the defualt browser. This not to day that Edge is in any way superior, only that most users are not capable of selecting an alternative browser, including Internet Explorer. I the test the pages on my iPad and the default Safari.

I have also installed Chrome and Firefox on my iPad, while this maybe a mixed "message", pages perform differently. Whether this mirrors differences that can be expected on a desktop, who knows?

Top

The iPad and Safari

Checking my changes to .css files on my iPad I have to use an alternate browser unless I "clear out" the browser data for my website. This is a pain but both Chrome and Firefox seem to flush out the old version of the .css file without having to do the "flush".

This highlights the importance of checking that changes to .css files on multiple platforms need to be performed. The old rwd.css was broken for centering images when I added some more class definitions to the media query for phones.

The Chrome Browser

When looking in how Google Chrome's Private Prefetch Proxy works I can see how the handling of Browser Cache can be important.

More about controlling cache

There is much to learn here!

Links

Top

References:

  • Force browser to clear cache - https://stackoverflow.com/ questions/1922910/ force-browser-to-clear-cache
  • HTTP caching - https:// developer.mozilla.org/en-US/docs/Web/HTTP/ Caching

Site design by Tempusfugit Web Design -