Clearing browser cache through script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2016 01:25 PM
Hi there,
Is there a way to clear the browser cache through script instead of loading 'cache.do' page manually. Can somebody please help me on this?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2016 01:55 PM
One way to programmatically prevent browser cache for an Ajax call is to append Date.now() or Math.random() to the request so it appears "new" to the browser, although I'm not sure if this is applicable in your case.
Hope this helps.
Please feel free to connect, follow, mark helpful / answer, like, endorse.
John Chun, PhD PMP ![]() | ![]() |
Winner of November 2016 Members' Choice Award

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2016 02:29 PM
I have seen that you can use the following to reload a page and to ignore the cache.
Maybe try to find a way to use it in a script?
location.reload(true);
There is also commands you can use to block caching, but it is HTML and in the headers.
https://youtube.com/watch?v=zYi8KhP9SUk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2016 02:43 PM
Yes, John, these are the headers you can set on the server-side (e.g., processor) to prevent caching - I'm not sure if Sai has access to the server or if this may cause performance issues in other areas, though:
// disable page caching to avoid stale results
g_response.setHeader('cache-control', 'no-cache');
g_response.setHeader('pragma', 'no-cache');
g_response.setHeader('expires', '-1');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2017 10:39 AM
Is there a way to check whether a specific browser extension's is installed or not from Knowledge article is viewed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2016 02:50 PM
Thanks for your reply John.I have tried "location.reload(true);" already,still few gauges on homepage showing the previous data.