c# - MVC3 - AJAX Partial View is being cached...and I can't stop it -
i'm using mvc3 - have javascript function uses jquery get() partialview controller.
the problem it's being cached , keep getting stale content back.
i've tried [outputcache(duration=0)] on action, thinking prevent caching, no joy. client caching too?
edit:
i've been using way prevent caching may useful some.
$.get("/someurl?_="+$.now(),function(data) { // process data });
it's not clean, because each request passes _=12345678
(timestamp) it's never cached.
hope helps.
get requests automatically cached browser use .ajax()
function contrary .get()
function allows disabled caching:
$.ajax({ url: '/foo', type: 'get', cache: 'false', success: function(result) { } });
another possibility use post:
$.post('/foo', function(result) { });
Comments
Post a Comment