使用 POST 进行 jQuery 缓存

标签 jquery

虽然我在 jQuery AJAX Post 请求中设置了 cache:false,但它不会添加额外的 randomg 字符串。这是因为帖子不缓存吗?

感谢您的宝贵时间。

最佳答案

RFC 2616规定(在第 13 节中)不应缓存 POST 请求。

Some HTTP methods MUST cause a cache to invalidate an entity. This is either the entity referred to by the Request-URI, or by the Location or Content-Location headers (if present). These methods are:

- PUT
- DELETE
- POST

关于使用 POST 进行 jQuery 缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1592884/

相关文章:

jquery - Windows XP 和 IE8 组合 - div 对齐问题

php - JQuery 在内部自动生成的 img 上调用 .click()

javascript - jQuery tablesorter 按列 id 而不是列号排序

javascript - 悬停时的多图像过渡

jquery - 为什么我不能让这个对象位于另一个对象之上? (z-index 的东西)

javascript - 使用 jQuery 从文本变量中选择带有选择器的标签

jquery - 如何从mysql数据库显示struts2 jquery网格中的blob类型?

javascript - 无法使用 Jquery/Javascript 根据键值对数组进行分组

Javascript:如果 hasClass 然后 addClass

javascript - 如何在 div 中显示结果然后异步更新它们