Jquery loading taking excessive time

2019-09-16 03:05发布

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 firefoxfirefox net timeline ![enter image description here][2] Same page when loaded using Chrome is loading under 1sec. Attached is timeline from Chrome. enter image description here

1条回答
兄弟一词,经得起流年.
2楼-- · 2019-09-16 03:31

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.

查看更多
登录 后发表回答