使用POST进行jQuery缓存 [英] jQuery caching with POST

查看:62
本文介绍了使用POST进行jQuery缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Although I have set cache:false in a jQuery AJAX Post request, it does not add the extra randomg string. Is this because post does not cache?

谢谢您的时间.

推荐答案

RFC 2616 (在第13节中)指出POST请求不应该被缓存.

RFC 2616 states (in section 13) that POST requests should not be cached.

某些HTTP方法必须导致缓存使实体无效.这是Request-URI或Location或Content-Location标头(如果存在)所引用的实体.这些方法是:

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缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆