iis - How do I cache at both client & server when VaryByParam != "none"? -


I see a way to cache a customer both and on a server The parameter "version" changes server's output cache.

With this tag:

  & lt;% @ Output cache duration = "10" location = "any" VaryByParam = "none"%>  

I get these headers:

  HTTP / 1.1 200 OK cache-control: public content-type: text / html; Charset = UTF-8 End: Wed, 03 Feb 2010 02:29:24 GMT Last modified: Wed, 03 Feb 2010 02:29:14 GMT Server: Microsoft-IIS / 7.5 X-espnet-version: 4.0.21006 By X-Revival: ASP.NET Date: Wednesday, 03 February 2010 02:29:14 GMT Content-Length: 2364  

On this client side I want to do that, But the server side does not differ from this "version".

Meanwhile, with this tag:

  & lt;% @ Output cache duration = "10" location = "any" predefined = "version"% & Gt;  

I get these headers:

  HTTP / 1.1 200 OK cache-control: public, max-age = 4 content-type: text / html ; Charset = UTF-8 End: Wed, 03 Feb 2010 02:28:29 GMT Last modified: Wed, 03 Feb 2010 02:28:19 GMT Miscellaneous: * Server: Microsoft IIS / 7.5 X-espnet-version: 4.0 .21006 by X-Power: ASP.NET Date: Wednesday, 03 February 2010 02:28:25 GMT Content-Length: 2352  

This is what I want on the server side , But the "Vertical: *" header forces the browser to reload the page on every request.

Is there a way to caching different clients and servers according to any parameter?

found this:

  protected zero page_load (object sender, eventAgps E ) {Response.Cache.SetOmitVaryStar (true); }  

More info here:

It is believed that it has been set up for ASP.Net 4 Beta 2 (see), but it is still VS 2010 RC is broken in the form of. / P>


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -