0

最近我在 PageSpeed 上测试网站性能,在那里我知道我们有着陆页问题,这是 PageSpeed 告诉我们的:

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 中缓存重定向

4

1 回答 1

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");
于 2013-06-24T21:03:33.577 回答