localhost versus 127.0.0.1
Two questions (perhaps related) a) Why is accessing items via 'http://127.0.0.1:8080/webpage' versus 'http://localhost:8080/webpage' so ___SLOW____?
b) Why is Firefox localhost access so slow in general (relative to both earlier versions of FireFox (such as FireFox '14') and relative to your competitors)?
For development we use local hosting (listening to port 8080). On loading (or even on use) our web page generates '300+' HTTP 'get' requests to complete the page (it is a local mapping application with multiple data layers and, depending upon the visibility of the layers, can easily generate 300+ 'get' requests to refresh the display.
With Firefox we have discovered a SIGNIFICANT difference in access time when we format the URL as 'http://127.0.0.1:8080/resourcetoget' (molasses-type slow for 300+ 'get' requests) versus 'http://localhost:8080/resourcetoget' (fast-ish).
I agree that '127.0.0.1' is probably not the 'best' localhost value to use, but we have been using this value for years (old habits die hard, and 'localhost' did not always work for all browsers (now it does)). We are in the process of changing our scripts and applications to use 'localhost' versus '127.0.0.1'.
However, even in the (faster) 'localhost:8080 mode, Firefox is still less that 1/2 the speed of Chrome, Safari, and IE9+ when displaying the same data from localhost.
When access occurs to the same web page data (and server software) over the internet (i.e., non-localhost), Firefox displays the same page as fast as (if not faster than) Chrome/Safari/IE.
Thus the problem is not in the 'display engine' but apparently in the communication protocol.
While I have not checked 'all' earlier versions of FireFox, this localhost speed issue does NOT appear to occur in FireFox '14' (from several years ago).
From the size of the download FireFox has gone through 'a large number' of changes from 'V14' to 'V39' (current). Any ideas as to when there was a major rewrite of the localhost processing?
I know the 'about:config' has oodles of parameters. Any thoughts about which ones to tweak that might at least 'change' localhost performance? I've tried both increasing and decreasing 'network.http.max-connections' and 'network.websocket.max-connections' w/o apparent 'help'.
Semua Balasan (2)
I first started to try to discover the order that Firefox requests a webpage. You might also check it out in the web tools console if you open two different pages side by side to see if there is a difference in the number of requests. Let me know how that goes (since this is a network I cannot access to test. ) I added the other about:config entries that affect localhost. One of them makes me want to ask if you have a proxy on your network? If there is no proxy it will look like the second screenshot
My second assumption from the about:configs is that the dns for 'localhost' is offline and set to true. "network.offline.dns-localhost" you might be able to doubleclick on the entry and add a comma then the ip addresss.
localhost also appears to be on a whitelist, maybe adding the ip address to this as well.