The majority of advice on how to disable browser caching seems to revolve around how to make it work in IE.  However, in Firefox the fixes don’t always seem to work.  Below are some notes and sample code on how to make it work for both browsers:

The SetNoStore() seems to be a necessity for FireFox
HttpCacheability.NoCache has an issue in IE (not sure about FireFox) when you
are on a secure (https) page and are trying to send a file by setting the
headers. It causes the file download to not work properly.

SetValidUntilExpires(), SetRevalidation() – unsure if this is a requirement
at this time. Was added because it was still giving problems in FireFox before
SetNoStore() was found.
SetExpires() I tried to set this to 5 days in the
past and I still got the 2 second window.

public static void DisablePageCaching()

//Used for disabling page caching





352 is an innovation and growth firm. Leading companies hire us to find billion-dollar opportunities, build killer new products and create hockey-stick growth. We bring grit and new-fashioned thinking to innovation, digital development and growth marketing.