Iβm developing mobile, smartphones, websites with the same dynamic content, I canβt install a different user agent. The default value is Accept-Encoding. How can we replace the different: Accept-Encoding vary: User-agent?
I tried all these
1. <% @OutputCache Duration = "180" VaryByHeader = "User-Agent"%>
2.HttpContext.Current.Response.AddHeader ("Vary", "User-Agent");
3.HttpContext.Current.Items.Add ("Vary", "User-Agent");
4.HttpContext.Current.Response.Cache.SetVaryByCustom ("User-Agent");
5.HttpContext.Current.Response.Cache.VaryByHeaders.UserAgent = true;
6.HttpContext.Current.Response.Headers.Set ("Vary", "User-Agent");
but still arriving
Cache-Control: public, max-age = 180 Content-Encoding: GZIP Content-Length: 9741 Content-Type: Text / html; Encoding = ISO-8859-1 Date: Tue, 23 Jul. 2013 12:19:23 GMT Expires: Tue, Jul 23. 2013 12:22:22 GMT Last change: Tue, Jul 23. 2013 12:19:22 GMT Server: Microsoft-IIS / 7.5 Vary: Accept-Encoding
where i want
Cache-Control: public, max-age = 180 Content-Encoding: GZIP Content-Length: 9741 Content-Type: Text / html; Encoding = ISO-8859-1 Date: Tue, 23 Jul. 2013 12:19:23 GMT Expires: Tue, Jul 23. 2013 12:22:22 GMT Last change: Tue, Jul 23. 2013 12:19:22 GMT Server: Microsoft-IIS / 7.5 Vary: User-Agent
thanks
source share