A website I am visiting occasionally makes XHR requests to http://detectportal.firefox.com/success.txt which is a text/plain resource whose body contains the text success.

I am unable to figure out what the purpose of this HTTP request might be.

3 Answers 3


It is used by Firefox when detecting whether it is using a captive portal.

A captive portal is a Web page that the user of a public-access network is obliged to view and interact with before access is granted.

Captive portals are typically used by business centers, airports, hotel lobbies, coffee shops, and other venues that offer free Wi-Fi hot spots for Internet users.


  • So what you are proposing is that when the browser trying to access the website is connected through such a coffee shop, the request to ...detectportal... does not return success and thus the browser (the javascript) will do something different? Mar 16, 2017 at 9:36
  • No idea how it is used.
    – Steve
    Mar 16, 2017 at 10:01
  • 5
    The website isn't trying to access that url. Your browser's built-in mechanisms are doing that. And if it doesn't return success, Firefox will show an alert notification with a link to load the captive portal (so you can accept the terms or login to the filtered wifi connection).
    – Stephen S
    Mar 28, 2018 at 19:32

Captive portals are generally found at public wi-fi hot-sports, Starbucks, Airports.

Firefox uses this to detect if it's trapped in a captive portal (success.txt not found) or can really access the internet (success.txt found). In other words it's just Firefox checking for a proxied environment.

If you put that URL into your hosts file. Firefox may decide that you are caught in a fake wi-fi hotspot.

Source: https://groups.google.com/d/msg/mozilla.support.firefox/TJgV_uODg_I/uEe30_njBAAJ


To disable this:

  1. Enter about:config into your location bar. Accept the risk.
  2. Locate and set network.captive-portal-service to false

Source: https://www.blackhillsinfosec.com/towards-quieter-firefox/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.