Preventing jQuery from cache busting resources loaded during AJAX callbacks that use the `html(…)` function

后端 未结 1 1193
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-15 05:48

Using jQuery 1.7.1, I am loading some HTML fragments via AJAX that are injected into the DOM via the html() method.

The HTML content itself cannot be c

相关标签:
1条回答
  • 2021-01-15 06:21

    If your server is set up to correctly identify which resources can and cannot be cached, then the cache: false option should not be necessary.

    Another alternative is to use a POST rather than a GET using the type: 'POST' option on the ajax method.

    0 讨论(0)
提交回复
热议问题