How asp.net MVC's cache and Firefox's cache work? -


I *. To write the cache header on Png requests, I use the following code: response.Buffer = false; Response.BufferOutput = false;

  // encoding based on the content type and file extension and // whether the response response is compressed. Content Type = Mimmapping GetMimeMapping (physicalFilePath); If (mode! = Response Compression Type. Non) response. Append header ("content-encoding", mode.tostring (.) Toolless ()); reaction. AppendHeader ("content-length", count.ToString ()); // Empty the proper cache header which will cache the response to the // cache of the browser for the default cash duration response. Cash Set cacheability (HTTP capability public); reaction. Cache.AppendCacheExtension ("Mandatory-Certified, Proxy-Modify"); Response.Cache.SetMaxAge (DEFAULT_CACHE_DURATION); Response.Cache.SetExpires (DateTime.Now.Add (DEFAULT_CACHE_DURATION); Response.Cache.SetLastModified (lastModified);  

But every time I refresh the page that contains the PNG URL, it will be posted again on the web server. It seems that the cache header does not work, and worse, this browser cache also does not work.

I am using asp.net mvc. Can anyone tell me the right direction? Thanks!

will be a post ever will not be cached If any browser or server requests a POST request from the browser, then the server will be execute it. You can not cache the results post not the only way to do this POST not to be released.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -