开发者

how to disable cache? [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

asp.net mvc disable browser cache

how to disable cache for a method in asp.net mvc3?

Problem in IE9 I am saving some data on /home/ page. The page saves data and reload the pag开发者_StackOverflowe to show the newly updated result. In other browsers FF/Opera page refresh is getting new results but on IE9 its showing old data.


Response.Cache.SetCacheability(HttpCacheability.NoCache);


Just reload the page with some random parameter.

Like: /home/?rd=2823772

Make sure to always change the rd parameter to another random number on each reload. This way, IE9 will not have the page cached and it'll refresh like FF/Opera.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜