Page contents not updating when loading with AJAX
I have a script that uses AJAX 开发者_高级运维to load certain pages of a site. The page contains information that changes depending on current time.
The problem i have come to is that when i load the page with AJAX, page contents remain the same no matter how many times i try to load it, as if it was cached somehow, but when i go to that page manually in other browser tab and just hit F5, contents of that page DO change every single time as it should be.
I am not a pro so i have no idea what causes this and how to fix it. Any ideas how to fix this purely within the JavaScript file?
Thanks
GET requests could be cached by the browser and IE is extremely aggressive about them. So there are different possibilities: either append some random number to the url or use POST requests.
精彩评论