2013-06-24 57 views
0

最近,我上的PageSpeed,在那里我才知道,我们有着陆页的问题测试网站性能,这里就是的PageSpeed告诉我们: 缓存重定向在asp.net

To speed up page load times for visitors of your site, remove as many landing page redirections as possible, and make any required redirections cacheable if possible. 

它进一步说:

http://www.avnetwork.com/ is a non-cacheable redirect to http://www.avnetwork.com/index 

谁能告诉我如何缓存重定向在asp.net

回答

1

编程方式,你可以尝试这样的事:

Response.Cache.SetExpires(DateTime.Now.AddDays(1)); 
Response.Cache.SetCacheability(HttpCacheability.Private); 
Response.Cache.SetValidUntilExpires(true); 
Response.AddHeader("Vary", "User-Agent, Accept-Encoding"); 
Response.Redirect("http://www.avnetwork.com/index");