1

I need to configure a extension to load a page that can never exist. It should be as fast as possible. The obvious choice is about:blank, but the catch is that the API used by the extension requires the http protocol. That appears to eliminate the possibility of using about:blank.

The obvious candidates are http://0.0.0.0 and http://127.0.0.1 (the latter of which is the loopback address, and should be the same as http://localhost).

In this specific context, what is the difference between using http://0.0.0.0 and http://127.0.0.1?

What I've read so far (but none directly answer the question for this specific context):

3
  • 1
    What makes you feel the answer(s) you've already read don't apply to your context? Commented Nov 2, 2015 at 21:23
  • I would not use http://0.0.0.0 since 0.0.0.0 is not a routable IP address, so its technically not valid to use. its only been recently that the browsers have started to special case 0.0.0.0 to mean the local machine.
    – heavyd
    Commented Nov 2, 2015 at 21:31
  • 1
    @heavyd 0.0.0.0 does the trick in Firefox. You cannot use 127.0.0.1 as there may be a server running. OP wants to load a page that can never exist.
    – DavidPostill
    Commented Nov 2, 2015 at 21:42

1 Answer 1

4

In this context, what is the difference between http://0.0.0.0 and http://127.0.0.1?

I need to configure a firefox extension to load a page that can never exist. It should be as fast as possible.

That rules out using http://127.0.0.1 as you cannot guarantee that a page will not exist (I'm running a server on local host for example).

There cannot be a server running on 0.0.0.0.

Using Firebug gives us the answer.

http://0.0.0.0 is much faster regardless of whether there is a server running on 127.0.0.1 or not.

Case 1 - http://0.0.0.0:

enter image description here

enter image description here

Case 2 - http://127.0.0.1 (no server running):

enter image description here

enter image description here

Case 3 - http://127.0.0.1 (server running):

enter image description here

3
  • Thank you! It's interesting to see that 0.0.0.0 is so much faster than 127.0.0.1, especially since 1.02 seconds is not enough time to wait for a full time-out for a server on 127.0.0.1. Any ideas why? Commented Nov 2, 2015 at 21:58
  • In case 2 (127.0.0.1 no server, 1s) there is no full-time out to wait for ... I've added the breakdown of the timeline for case 1 and 2
    – DavidPostill
    Commented Nov 2, 2015 at 22:09
  • Interesting. I wonder how it differentiates between "no server on 127.0.0.1" and "server timing out". Commented Nov 2, 2015 at 22:19

You must log in to answer this question.

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