I have an ajax function (in jquery) which update the html. It's ok.
Now, When I tap enter in the adress bar (to refresh), my html is not updated (old content).
Whereas, when I do cmd + R, my html is always ok.
What is the problem ? Why my content shows old content from the adress bar ?
Edit :
I use Chrome et load() in jQuery
If you have problem with caching in the browser itself, you need to set header to prevent caching in your Server Side's Code (e.g. Php, Java, Python .....etc).
But if you want to avoid caching in your Ajax Function use this Code:
$.ajax({
url : scriptUrl,
type : "get", // or 'post'
cache : false, // This is to avoid Cache in Ajax Requests
// .........................etc
});
Notice: Give more details on your question to get a sharper answer.
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