Rus*_*ang 5 browser asp.net firefox caching http
我正在asp.net网站上工作,像普通用户一样,我们在编码和测试期间使用asp.net开发人员服务器.今天,我发现firefox没有缓存我网站的任何静态文件,因为我们的应用程序非常大,它使页面加载时间非常慢.我查了一下firefox:cache,所有的静态文件缓存设置都是这样的
Key: http://localhost:26851/App_Layout/icons/actions/email/folder.png
Data size: 871 bytes
Fetch count: 1
Last modified: 2010-08-19 11:59:46
Expires: 1969-12-31 16:00:00
Key: http://localhost:26851/Framework/ScriptLibrary/JQueryPlugins/ui.mouse.js
Data size: 5079 bytes
Fetch count: 1
Last modified: 2010-08-19 11:59:39
Expires: 1969-12-31 16:00:00
Run Code Online (Sandbox Code Playgroud)
FireBug显示这样的标题
Server ASP.NET Development Server/9.0.0.0
Date Thu, 19 Aug 2010 22:10:27 GMT
X-AspNet-Version 2.0.50727
Cache-Control public
Etag "1CB3F32C834A880"
Content-Type text/css
Content-Length 1775
Connection Close
Run Code Online (Sandbox Code Playgroud)
Firebug有另一个名为"缓存"的标签,信息是:
Last Modified Thu Aug 19 2010 15:10:27 GMT-0700 (Pacific Daylight Time)
Last Fetched Thu Aug 19 2010 15:10:27 GMT-0700 (Pacific Daylight Time)
Expires Wed Dec 31 1969 16:00:00 GMT-0800 (Pacific Standard Time)
Data Size 1775
Fetch Count 10
Device disk
Run Code Online (Sandbox Code Playgroud)
到期日期可以追溯到1969-12-31,我相信这就是他们加载时间的原因.我正在使用Visual Studio 2008,Windows 7机器.该应用程序在IE中工作正常,内容被正确缓存.
以前有人看到过这种行为吗?
谢谢大家帮忙解答这个问题。我相信我找到了 FireFox 在 Windows 7 上显得非常慢的原因。当我使用Windows XP时,我没有注意到速度慢。
首先,Firefox 不会缓存来自 asp.net Web 开发服务器的任何资源。这个事实在 XP 或 Window 7 中并没有改变。当我今天使用 firebug 检查资源下载时,我注意到 DNS 查找需要几秒钟。然后我发现对于window 7默认安装,windows\system32\driver\etc下的HOSTS文件没有DNS条目127.0.0.1 localhost。通过将此行添加到 HOSTS 文件中。我的网站和以前一样快。
| 归档时间: |
|
| 查看次数: |
2280 次 |
| 最近记录: |