AKor AKor - 1 year ago 67
jQuery Question

Setting the cache in jQuery $.post() to be false?

I have this code:

$.post("php/tagNotifUnsub.php", $("#tagNotifUnsub").serialize(), function(){
$('#tagSubDiv').load('tags.php #tagSubDiv', function(){$( "button, input:submit, input:button, a#jql, input:radio" ).button();});

I understand that $.post is just another name for $.ajax. And I know $.ajax has caching on by default. I want it to be uncached. How can I do that?

Answer Source

$.post is not cached.

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

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download