In my code, I use window.location.replace(url) to redirect the user to a different web page.
I also want to make sure that when the user goes to that page, the browser will get the latest code from the server, not just use the cache. the above code seems working fine in Firefox. It will get the latest code from the server. But in IE it seems that it is using cached value from user’s previous visit. How to I solve this problem?
I know you can use location.reload(true) to do a forced refresh. But I only want to refresh the web page when the user is redirected from using the code above.
Thanks.
If you append a timestamp to the end of the url, your browser should bypass the cache. For example,