【发布时间】:2011-03-26 14:10:26
【问题描述】:
我有一个网站,用 Firefox 加载一个页面需要 10 秒,再加载图像需要 10 秒。这是一个在 apache 上运行的 php 页面。图片只是静态图片。
它在 chrome 上运行良好....即时加载。
在谷歌上搜索答案已将我指向可能存在的问题,即保持活动状态和缺少内容长度使 firefox 感到困惑,实际上,服务器似乎没有在静态或非静态内容上设置内容长度,但在服务器上禁用保持活动会使加载时间加倍!
有些网站建议在浏览器上禁用保持活动,但我不愿意向所有查看该页面的人推荐!我是不是找错树了?
浏览器是 Lucid Lynx 上的 firefox 3.6.8。服务器是 Apache 2.2.11。
apache.conf 已附加...我认为它是开箱即用的,尽管我将 KeepAlive 超时减少到 3 以尝试加载页面是徒劳的。
我是不是找错树了?
ServerRoot "/etc/apache2"
LockFile /var/lock/apache2/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 3
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/apache2/error.log
LogLevel warn
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
Include /etc/apache2/conf.d/
Include /etc/apache2/sites-enabled/
【问题讨论】:
-
你能链接到实际的网站吗?是不是重JS?
-
我在farnthropkelly.co.uk建立了一个测试站点
-
我已经在那个网站上发布了一些时间... DNS 查找很好.. 目前我认为这是一个奇怪的 Firefox 错误.. 将在 Windows 版本上尝试这个firefox,也许还有 IE,或者不同版本的 firefox。
-
我一直在对许多其他站点运行篡改数据工具,看起来这是我的 firefox 安装在许多站点上遇到的问题,但已被本地缓存掩盖。这可能是本地网络问题。
-
“保持活动状态和缺少内容长度的可能问题” - 您能否为此提供任何参考? TIA
标签: apache http firefox keep-alive content-length