Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The client has an HTML file that is used to submit input information, and the problem is that each time you press refresh, it is not the entire page being reloaded, as if it were a cache.
How do I avoid this problem because the last input value still appears in the text box and is only reloaded in the Address bar when you press ENTER for the entire page?
1. Add code to the head area in HTML:
Copy Code code example: <meta http-equiv= "Pragma" content= "No-cache"/>
<meta http-equiv= "Content-type" content= "No-cache, must-revalidate"/>
<meta http-equiv= "Expires" Content= "Wed, 1997 08:21:57 GMT"/>
2, clear the temporary cache
Copy Code code example: <body onload= "Javascript:document.yourFormName.reset ()" >
3,jquery Ajax clears the browser cache in two ways:
1), set the property cache:false through $.ajaxsetup, so that Ajax does not invoke the browse cache.
Copy Code code example: Jquery.ajaxsetup ({cache:false})
2), add a random string to the Ajax URL to avoid browsing the cache, for example:$.ajax ({url: ' Test '). PHP? ' +parseint (Math.random () *100000)}) cache.
About JS Cache processing