6

I am developing a simple HTML/CSS only site locally.

Annoyingly (and weirdly) Chrome is taking ages to refresh the page after I make changes - around 5 - 7 secs.

Computer is fine, as is internet connection. Sites online load normally.

Would anyone know why this is occurring and how to fix it (if possible)?

Thanks!

(Running Chrome 30.0.1599.69)

1
  • This is a problem with the local server like IIS.. which local server you are using ?
    – Pradip
    Oct 9, 2013 at 11:04

4 Answers 4

7

I know this is old, just wanted to let you know what fixed it for me.

If you're hosting locally, your code may look something like this:

src="//code.jquery.com/jquery-1.11.3.min.js"

Add in the http: to the src attribute or chrome is going to look for the jQuery library locally.

src="http://code.jquery.com/jquery-1.11.3.min.js"

1
  • 1
    For me, it wasn't jQuery, but another library. But in my case, changing src="//..." to src="http://..." completely worked. Mar 21, 2019 at 14:19
3

Found it was because I was linking out to Googles hosted JQuery library. It doesnt like loading that from local for some reason.

0
0

After months, I finally found the solution to this problem on my case. The following html tag was making it very slow on Chrome and IE, but not Firefox (locally):

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

Since I'm not that worried about compatibility I just removed it.

0

I don't have an answer, but I have been noticed this bug for quite a while.

It seems to be stuck at loading certain local resources for no reason (and it would eventually load, albeit took 10+ seconds):

show slow loading

And during the whole time, nothing is rendered on the page (totally blank).

  • It does not happen with Firefox.
  • It does not happen if you simply host it on any localhost server.

The weird thing about this bug is that it isn't caused by any single resource or html element; once you reduced the elements on the HTML to a degree, it will suddenly start to work.

That's why the above answers were able to "fix" it by randomly remove something.

If you try to reduce an HTML file to find a minimum reproducible example, you will realize there are multiple ways to make it work (mostly by removing some JS, but sometimes removing some tag would also do the trick); there is no single culprit.

I personally think it's some part of the rendering process of Chrome doesn't work well with file:// protocol (probably due to lack of testing) and it's not exposed to dev tool well to tell/debug.

I have reported it on bugs.chromium.org but sadly no response yet.

4
  • In case of the accepted answer it was likely because of the same thing the most upvoted answer mentions: it was using // to automatically pick between http:// and https:// schemes, but the file was being opened with the file:// scheme.
    – gronostaj
    Apr 20, 2022 at 11:06
  • @gronostaj: if you check the sample HTML file I provided in the bug report page, there is only one // is used in that HTML, and changing it to absolute https:// or simply removing that <script> entirely doesn't fix the slow loading problem. So no, I don't think that's the (only) cause.
    – fireattack
    Apr 20, 2022 at 18:27
  • Also, the problem is more about: why it doesn't render the page at all even if some resource loading is stuck. It doesn't happen if you host the file with any static server (like Python http.server); it doesn't happen at all on Firefox. So I would still consider it a bug even if you can work around it. I expanded the answer above to make it more clear.
    – fireattack
    Apr 20, 2022 at 18:37
  • 1
    I wasn't referring to your example, but to original poster's experience. Removing jQuery worked for them and my suspicion is that they had it included using the // "scheme". I'm not saying the bug doesn't exist - it seems to be verified according to your report - but that it's not what may have been causing OP's problem.
    – gronostaj
    Apr 21, 2022 at 7:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .