views:

32

answers:

2

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
or add the pragma no-cache directive header into the master page??
jim
@jim: I like that. Post that as an answer and I'll mark it.
Byron Sommardahl
byron-appreciate the generosity... have a good one
jim
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