본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

localhost versus 127.0.0.1

  • 2 답장
  • 1 이 문제를 만남
  • 1 보기
  • 최종 답변자: guigs

more options

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'.

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'.

모든 댓글 (2)

more options

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.

more options

localhost also appears to be on a whitelist, maybe adding the ip address to this as well.