I have a bookmarklet that keeps using cache versions of http://www.imvu-e.com/products/hpv/download/HPV.js
. I want it to never cache it and always reload it.
This is the hyperlink I use to save the bookmarklet (which users drag to browser toolbar that installs it):
<a href="javascript:(function(){
c = document.createElement("script");
c.type = "text/javascript";
c.src = "http://www.imvu-e.com/products/hpv/download/HPV.js";
c.onload = c.onreadystatechange = function() {
if ( ! (d = this.readyState) || d == "loaded" || d == "complete"){
document.documentElement.childNodes[0].removeChild(c);
version='beta';
}
};
document.documentElement.childNodes[0].appendChild(c);
})();">Run HPV</a>
js and . css files. That is the reason those new changes will not appear to the user. The user either has to clear the browser cookie & reload the page or else he or she has to do a hard refresh of the page by pressing Ctrl+F5.
To Completely Disable Write-Behind CachingClick File System, and then click the Removable Disk tab. Click to clear the Enable write-behind caching on all removable disk drives option.
Add a useless querystring to the end of your url:
c.src = "http://www.imvu-e.com/products/hpv/download/HPV.js?" + (new Date).getTime();
Use jQuery's getScript instead of a script tagging and altering the source
<script>
$.getScript("JavascriptFileName.js?timestamp=" + new Date().getTime());
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With