Jquery loading taking excessive time

走远了吗. 提交于 2019-12-13 04:12:23

问题


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.



来源:https://stackoverflow.com/questions/14940098/jquery-loading-taking-excessive-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!