为什么火狐3.6.8不缓存从asp.net开发服务器静态内容是什么? [英] Why does FireFox 3.6.8 not cache static contents from asp.net developer server?
问题描述
我工作的一个asp.net网站,像普通用户,我们的编码和测试过程中使用asp.net开发者服务。
今天,我发现firefox的不缓存我的网站的任何静态文件,因为我们的应用是pretty大,它使页面加载时间非常慢。
我查了Firefox关于:缓存,所有的静态文件缓存设置看起来像
I am working on a asp.net web site, like normal user, we use asp.net developer server during coding and testing. Today, I found the firefox not cache any static file of my site, since our application is pretty big, it made page load time very slow. I checked firefox about:cache, all the static file cache setting looks like
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
萤火这样表示标题
FireBug shows header like this
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
萤火虫还有一个叫做缓存选项卡上,信息是:
Firebug has another tab called "cache", the information is:
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
的到期日期重新设置为1969-12-31,我相信这就是为什么它们被加载时间非常的原因。
我使用Visual Studio 2008,Windows 7计算机。该应用程序工作正常在IE中,内容是否正确缓存。
The expires date is set back to 1969-12-31, I believe that's the reason why they are loaded very time. I am using Visual studio 2008, windows 7 machine. The application works fine in IE, the contents are properly cached.
有没有人看到面前这种行为?
Did anybody see this behavior before?
推荐答案
谢谢大家的帮助这个问题。我相信我发现为什么火狐似乎对窗口7盒很慢的原因。当我使用Windows XP我没有注意到缓慢。
Thanks everybody for helping this question. I believe I found the reason why FireFox seems very slow on window 7 box. I did not notice the slowness when I was using windows XP.
首先,Firefox将不缓存从asp.net web开发者服务器的任何资源。这个事实不会在XP或Window 7改变。
当我使用萤火检查资源下载的今天,我发现DNS查找需要几秒钟。后来我发现了窗口7默认安装中,主机上的WINDOWS \\ SYSTEM32 \\驱动程序\\等没有DNS条目127.0.0.1本地主机文件。通过加入这一行HOSTS文件。我的网站是像以前那样快。
First all, Firefox will NOT cache any resource from asp.net web developer server. this fact does not change in XP or Window 7. When I use firebug check the resource downloading today, I noticed DNS lookup takes a couple of seconds. then I found out for window 7 default installation, the HOSTS file under windows\system32\driver\etc does not DNS entry 127.0.0.1 localhost. By adding this line to HOSTS file. my site is as fast as before.
这篇关于为什么火狐3.6.8不缓存从asp.net开发服务器静态内容是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!