Chrome just doesn't finish loading JS files

前端 未结 6 1355
名媛妹妹
名媛妹妹 2021-02-05 05:51

I am writing an app that includes about 12 short JS files in the section (I know, I should merge them and move them just before the end of

6条回答
  •  一向
    一向 (楼主)
    2021-02-05 06:35

    One possibility is that you have Keep-Alive enabled and it is not working properly. I've seen this before. The browser establishes it's maximum number of connections to your server (typically 6) to download the first few files (CSS, JS etc.) then those connections are not released until they time out. My symptoms were not quite the same as yours - the timeout was 20 seconds and everything would load in batches of 6 after that - but this could still be the cause.

    In your Apache configuration (httpd.conf on most systems), look for the KeepAlive line (or add it if it's missing) and set it to Off.

提交回复
热议问题