开发者

Should Get or should Post be used to get AJAX content that expires often?

I have AJAX calls that get content that开发者_运维技巧 expires often.

To get that content is is better practice to use:

  • Post

or

  • Get and set the Cache Expiration Date as immediate on the server?


You should use GET with this kind of header: "Cache-Control: no-cache, must-revalidate" read when POST should be used.


If you're only retrieving data, then you should use GET and use the appropriate cache-related HTTP headers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜