Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

clear browser cache and history via javascript and load latest js files [closed]

how to clear browser cache and history via javascript I found some links like:-

How to clear browser history oan clear cache?

how to clear browser hash history in javascript

but they do not properly described on how this can be achieved via javascript ( or jQuery)

I require this so that the user do not have to do a [Ctrl+F5] or manually clear cache and the most recent version of javascript file is loaded in the browser.

The main aim is to load the latest javascript files every time the user visits the website. My application in ASP.NET MVC based and javascript files are included in .csHtml file.

like image 217
Atur Avatar asked Jan 25 '13 14:01

Atur


1 Answers

call window.location.reload(true) for a ctrl+F5 from script. :)

like image 87
Avishek Avatar answered Sep 30 '22 08:09

Avishek