tags:

views:

30

answers:

1

I know that $post() is a short hand for the ajax() in jQuery. I also saw that ajax() has a cache parameter that is true by default.

My question is: Is it dangerous to use $post() to get back html from the server if you DON'T want caching since the default for ajax() caching is true?

Or is a post never cached?

I wasn't sure if it was safe or not because I always want to get current data back from the web server.

Thanks for any help.

+4  A: 

Pages fetched with POST are never cached, so the cache and ifModified options in jQuery.ajaxSetup() have no effect on these requests.

read : http://api.jquery.com/jQuery.post/

sushil bharwani
Ahh, I missed that. Thank you.