views:

53

answers:

2

Hi,

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?

Thanks,

Jon

A: 

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

Hank Gay
+1  A: 

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

mathroc