I'd like to disable browser caching for every page on my site. I know I can do it per action, but I'd like to know if there's a way to do it site-wide.
A:
If you use custom base controller class, you can override it's OnResultExecuting()
method and put the same code you would use per action there.
Necros
2010-07-30 14:51:06
or add the pragma no-cache directive header into the master page??
jim
2010-07-30 16:03:58
@jim: I like that. Post that as an answer and I'll mark it.
Byron Sommardahl
2010-07-30 21:44:15
byron-appreciate the generosity... have a good one
jim
2010-07-30 22:04:05
A:
Byron - as per your nudge :)
add the pragma no-cache directive header into the master page!!
along the lines of:
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
Cheers -have a good weekend
jim
jim
2010-07-30 21:57:40