Prevent browser caching of AJAX call result

后端 未结 21 1198
醉酒成梦
醉酒成梦 2020-11-22 04:47

It looks like if I load dynamic content using $.get(), the result is cached in browser.

Adding some random string in QueryString seems to solve this iss

21条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 04:59

    Basically just add cache:false; in the ajax where you think the content will change as the progress go on. And the place where the content wont change there u can omit this. In this way u will get the new response every time

提交回复
热议问题