When the website goes live from local we have to press F5 to reload the web page. Can we give idea to clear cache while loading website? Is there any jQuery or JavaScript for hard refreshing a website?
Asked
Active
Viewed 1,222 times
0
-
press shift+F5 together. – reza Nov 21 '16 at 06:44
-
1Thanks but Without shift + F5 , can we automatic hard refresh using javascirp or jquery? – Jeewan Kunwar Nov 21 '16 at 08:31
2 Answers
1
Look into the cache-control and the expires META Tag.
Another common practices is to append constantly-changing strings to the end of the requested files. For instance:
<script type="text/javascript" src="main.js?v=12392823"></script>

Community
- 1
- 1

Mayank Pandeyz
- 25,704
- 4
- 40
- 59
0
Use:
location.reload(true);
This will reload the page from the server. Do your research! (Javascript hard refresh of current page).

Community
- 1
- 1

Eli Kerrison-Male
- 60
- 1
- 10