asp.net - Force Cache Refresh When Editing and Redisplaying Content -


i using asp.net mvc , have view displays item , view allows editing item. when user submits edited item, redirects them view item. changes not being reflected when redirected because item view being cached. view item page can edited inline , submit button uses javascript submit , refresh page.

i've noticed stackoverflow somehow makes work when edit item, redirects page changes reflected. caching set public, max-age=120 surprised browser doesn't pull local copy without reflected changes...

anyway, there way force cache refresh in these cases? prefer not append random query string value, if there no other way do.

there cache-control meta tag can set. put in head section

<meta http-equiv="expires" content="tue, 01 jan 1980 1:00:00 gmt"> <meta http-equiv="pragma" content="no-cache"> 

http://www.chami.com/tips/internet/113096i.html

or .net way

<%@ outputcache location="none" varybyparam="none" %> 

http://www.dailycoding.com/posts/how_not_to_cache_a_page_output_in_aspnet.aspx


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -