We are developing a site using tomcat and MySQL v5.5.24. Site works fine on Chrome, however Firefox and IE are blocking javascript consistently for 20 secs on page onload. Every page on firefox from localhost minimum takes 20secs to load for different resources (css/js/image). Problem is that it is not the same script every time. It could be any random Other sites works fine though on firefox. Attached is timeline from firefox ![enter image description here][2] Same page when loaded using Chrome is loading under 1sec. Attached is timeline from Chrome.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
We had this code in web.xml which was causing the problems.
<filter>
<filter-name>2WayFilter</filter-name>
<filter-class>com.osmoticweb.gzipfilter.GZIP2WayFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>2WayFilter</filter-name>
<url-pattern>*.js</url-pattern>
</filter-mapping>
Once we took this out, things were back to normal.