高性能网站建设指南 — 笔记– 12.避免Redirect

Redirect导致新的HTTP请求,或多或少会浪费时间。

可以想法避免Redirect,比如

   1.在链接里写 "www.yoursite.com/"  而不是 "www.yoursite.com",后者会产生一个redirect到前者

   2.Prefer URL rewrite to redirect. Apache就支持URL Rewrite.

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.