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):

  • 1
    What makes you feel the answer(s) you've already read don't apply to your context? – Ƭᴇcʜιᴇ007 Nov 02 '15 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 Nov 02 '15 at 21:31
  • 1
    @heavyd http://0.0.0.0 does the trick in Firefox. You cannot use http://127.0.0.1 as there may be a server running. OP wants to load a page that **can never exist**. – DavidPostill Nov 02 '15 at 21:42

1 Answers1

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

DavidPostill
  • 153,128
  • 77
  • 353
  • 394