Date

14-11-2017

When enhancing, supporting or developing applications and websites there comes a point (generally during testing a fix after a code change or a new release) at which a developer or consultant will say to themselves “I’ve seen/said this before” after a customer says that they cannot see the change, despite the developer having tested the change before releasing it to the user. It is at this point that we should consider documenting a procedure or process to assist clients and customers, which is what we've done below. 

“It works on my machine”

As an example, it is often the case that when modifying website code and especially JavaScript, client-side code, that a customer will note that they cannot see the fix and a consultant will say “it works on my machine”. It happens so often that there are cartoons and memes - even t-shirts - with these words.

Developer tshirt 

“It works on my machine” - T- shirt (source)


While this may seem amusing at the time, a situation like this can lead to a breakdown in trust with users and stakeholders and should be avoided by clearly communicating procedures to mitigate this issue.

The following procedure to clear browser caching for a number of common browsers will allow a user to see the latest changes on a website with confidence, and that they are not seeing cached code. Developers should make sure their users are informed of this process every time code is changed.

Cache clearing procedure

In order to test this fix, please ensure that caching is cleared on the tester’s browser as follows – below are general cache clearing steps for all browsers, which should be done every time one tests a site.
 
Additionally, there are specific browser instructions in case the normal cache clearing is not taking place and more detailed cache clearing is needed although the “All Browsers” steps should suffice for most situations.

All Browsers

Hit Ctrl-F5 in the browser to accomplish a full refresh of the browser cache. If issues are still encountered during testing and there is no valid explanation for them, use incognito mode (Ctrl-Shift-N) and browse the site in question – this is a worst case scenario – only to determine if caching is indeed the issue.

Sometimes server caching can be a reason for testing not working in which case a web server restart (performed by a network administrator or developer) will be required. This is rare as the site should be reloaded with any changes that are deployed, but can happen with a server code change, we restart the web server so this should not be an issue normally.

For the Chrome Browser:

Go to the three-dot menu at the upper-right of your Chrome browser to select Settings > Show advanced settings > Clear browsing data (or in the omnibar type "chrome://settings/clearBrowserData" without the quotation marks). This takes you directly to the dialog box to delete not only the history of your browsing, but also your download history (it won't delete the actual downloaded files), all your cookies, cached images and files (which help load pages faster when you revisit), saved passwords and more.

Chrome cache clearing

Microsoft Edge:

Go to the three-dot menu in the Microsoft Edge browser and select settings; in the fly-out menu, click the button under Clear browsing data that reads "Choose what to clear." Get rid of browsing and download history, cookies, cached data, stored form data, and stored passwords; click Show more and you can delete things like sites you've given permission to show pop-ups.

Microsoft Edge cache clearing

Internet Explorer

To wipe the history in IE11 and IE10, go to the Gear icon at the upper left corner and select Internet Options. On the General tab, you can check a box next to Delete browsing history on exit, or click the Delete button to instantly get rid of history, passwords, cookies, cached data (called Temporary Internet files and website files), and more. If you instead click Settings, you go to a History tab and ensure your history is only collected for a specific number of days, automatically deleting anything older.

The above procedure for cache clearing should be sent out to users or made available as part of Frequently Asked Questions to eliminate doubt on a software release.

 

[As written by one of our Technical Consultants]