7

Firefox runs my website significantly slower than IE or chrome. When I check the network tab, I see that 235ms is spent blocking. No blocking is reported for my site in chrome, and no blocking is reported in firefox for other sites, like google or amazon. It also has a much higher receiving time than chrome.

Firefox blocks the document

Its my understanding that blocking occurs because the browser has a limited number of connection that it can make:

What is meaning of 'Blocking' in Firebug Net Panel?

Here's an example of a website blocking before the document: http://thehill.com/ (sorry in advance for the politics). The blocking on this site doesn't always occur (it does on my site) and is about 1/10th the length of the blocking on my site.

Shouldn't the browser always have all its connections available when it tries to download the Document? Why would firefox be blocking on the document and not chrome, and how can I fix it?

Community
  • 1
  • 1
ContextSwitch
  • 2,830
  • 6
  • 35
  • 51
  • Does it always block for that long for every page? It would easier to look at the actual page. Otherwise one can only give you a blind assumption. – hexalys Oct 20 '13 at 05:51
  • For pages in my site it blocks for between 150-250ms. For other sites it doesn't block at all – ContextSwitch Oct 20 '13 at 16:24
  • Try increasing the number of connections in about:config (network.http.max-connections-per-server) and see if you're still getting "blocking". Is this on the main page request, or on the subsequent resources? Is this the only tab you have open? – Tsanyo Tsanev Oct 20 '13 at 17:03
  • Increasing the connections from 6 to 12 didn't have any effect, the blocking is still occurring. Its the only firefox tab I have open. – ContextSwitch Oct 20 '13 at 17:51
  • I've opened a ticket for this: https://bugzilla.mozilla.org/show_bug.cgi?id=929077 – ContextSwitch Oct 21 '13 at 18:53
  • Note the linux site link you mention should block due to https. Since technically, the definition of blocking is: https://getfirebug.com/wiki/index.php/Net_Panel "Time spent in a browser queue waiting for a network connection (formerly called Queueing) For SSL connections this includes the SSL Handshake and the OCSP validation step." – hexalys Oct 23 '13 at 05:57
  • It doesn't block on this site though: https://www.pnc.com, and it does block on other sites that don't use https – ContextSwitch Oct 23 '13 at 13:28

2 Answers2

2

Firefox has it's own http proxy settings. IE and chrome take proxy settings from windows settings. Please check if there is some difference between your FF and IE settings.

Next thing you can do is creating new, fresh profile in FF (make sure there is no addons installed) and trying again.

promanski
  • 567
  • 3
  • 12
  • I'm on Ubuntu, and it looks like firefox is set to "Use system proxy settings". I'll try it with the fresh profile, but I'll need firebug at least to see the results – ContextSwitch Oct 17 '13 at 16:51
  • After a profile reset, and only installing firebug, firebug is still showing blocking – ContextSwitch Oct 17 '13 at 16:55
  • here's an example of a website blocking before the document: http://thehill.com/ (sorry in advance for the politics). The blocking on this site doesn't always occur (it does on my site) and is about 1/10th the length of the blocking on my site. – ContextSwitch Oct 17 '13 at 17:26
0

try making your javascript calls asynchronous. My wild guess (with no codes provided that is the only thing possible) is that you have some javascript call that is blocking. try optimizing and debugging javascript, maybe that will help you see where did the blocking appear.

Rouz
  • 1,247
  • 2
  • 15
  • 37
  • How could there be an ajax call blocking if I haven't downloaded the document yet? – ContextSwitch Oct 21 '13 at 13:34
  • Not all javascript scripts are called onload event. So if you have some NON asynchronous call it could be blocking your document. So if you made them asynchronous maybe it will solve that problem of yours. Chrome and Firefox have different javascript engines so that may be the reason for different behavior. – Rouz Oct 22 '13 at 06:09
  • Since the blocking is happening on every page check if you have same js call everywhere. Even if the problem is not in javascript calls check what is the thing that is happening on every page. Perhaps you could narrow your search for bug like that. – Rouz Oct 22 '13 at 07:39
  • At the point of the blocking, none of the js has been downloaded from the server, the DNS lookup hasn't even happened yet. There is no javascript to execute at this point, becasue there is nothing, anywhere to execute until the document is downloaded. – ContextSwitch Oct 22 '13 at 13:29
  • @ContextSwitch maybe it is a silly question but....does blocking happen every time someone uses firefox to load your site? I mean, did you try loading your site from some other computer on other network. http://stackoverflow.com/a/3444333/2842257 did you check this thread? – Rouz Oct 23 '13 at 06:38
  • I've tried it from my laptop and my VM on my laptop. I'll have to try it with other machines. Neither condition in the answer you linked could be the reason for the blocking of the document though, since 1) the document is the first resource to be loaded, so all channels should be free, and 2) The document has not been downloaded, so there is no inline js to run – ContextSwitch Oct 23 '13 at 13:22
  • hello. Did you find solution to your problem? have you tried loading website from other locations, such as coffee shops? Any other updates? – Rouz Oct 29 '13 at 07:02
  • I'm still having the issue. When I try it at home the blocking time is consistently longer, around 350ms. I'm guessing its because my home network is slower than my work network. – ContextSwitch Oct 30 '13 at 01:18
  • I've also tried it on windows 8 at home, and there is still blocking, although its around 150ms. – ContextSwitch Oct 30 '13 at 01:27