All about clearing browser's cache

All about clearing browser's cache

Problem

After we roll out any UI update, an issue happens often is that our user cannot see the update in their computer, or the new UI does not function correctly (sad)

Usually, this problem is caused by the browser's cache which prevents user from seeing updated web contents. The problem can be fixed simply by clearing the browser's cache. 

We always assume everyone knows when & how to clear their browser's cache. If someone does not, he has to read "18 ways to clear the browser's cache"  (tongue)

This article provides an alternative solution to help user see our JavaScript/CSS updates without clearing the browser's cache. 

Solution

This solution was created by Steve Teraji (Unlicensed). Basically, just append a version number when including any JavaScript/CSS in the html/cfm.

For example:

<script type="text/javascript" src="client/app/directive/FileNumBrowser.js?ver=2.0.0"></script>

There is no definition for version number. I always user 3 digits which represents: <release #>.<qa #>.<build #>. The version number makes the JavaScript/CSS file a new location URL. The browser will reload the file instead of using its cache.

Related content