Bookmark and Share

Lee's 程序人生

HTML CSS Javascript XML AJAX ATLAS C# C++ 数据结构 软件工程 设计模式 asp.net Java 数字图象处理 Sql 数据库
  博客园  :: 首页  :: 新随笔  :: 联系 :: 管理

URL 优化的一个技巧

Posted on 2008-05-20 09:53  analyzer  阅读(248)  评论(0编辑  收藏  举报

When generating hyperlinks, always include a trailing slash if possible. For instance, navigating to http://msdn.microsoft.com/ie takes one more roundtrip than http://msdn.microsoft.com/ie/. When the browser navigates to the /ie url, the server merely sends down a 301 to the /ie/ url. Both links work, but the second version is faster.

也就是说,在地址栏中发送 URL:http://msdn.microsoft.com/ie ,服务器将会产生一个 301 转向至 http://msdn.microsoft.com/ie/。

所以直接发送 URL:http://msdn.microsoft.com/ie/ 速度将会更快,当然这种速度是感觉不到的,但优化应该“尽可能”。

我要啦免费统计