0

I have a website that loads roughly after 5s.

When I take a look to the network diagram on Chrome: enter image description here

As you can see, there's this relatively huge time span before favicon.ico is loaded (where nothing seems to happen, not even Content Download) that happens to delay page rendering.

What that might be? What am I doing wrong?

Mayas
  • 1,434
  • 5
  • 16
  • 25

2 Answers2

1

It looks like it's to do with the javascript file which is 2.6mb uncompressed. I'm guessing the browser is processing the javascript before grabbing the favicon.

If you disable javascript on the page then it loads in under .5 of a second.

defenestr8me
  • 116
  • 6
  • You are right. To complete your answer: I profiled the loaded Javascript. I found that there was a function that's resource consuming. rsa.generateKeyPair(). I put it there complying to the YAGNI antipattern. I removed it now. You can check the website if you wish. Many thanks. – Mayas Sep 24 '15 at 12:43
0

you can use defer attribute on script tag so that script executes only when dom content is parsed.

Aditya kumar
  • 167
  • 2
  • 8