[Fix] Firefox Taking Long Time in Opening Websites on Startup

If you are using Mozilla Firefox web browser and it’s taking too much time in opening websites upon startup, it might be happening due to regular tests performed by a built-in service called “Captive Portal Detection“. This article will help you in disabling this service and forcing Firefox to load websites immediately without any delay.

[Problem 1] Firefox Takes Too Much Time in Opening Websites When You Launch the Browser

Many times you might have noticed that when you first launch the Firefox browser after restarting your computer or after closing and re-opening Firefox window, it takes long time in opening the websites.

Many times I have personally encountered this issue. When I launch Firefox after restarting Windows, it takes long time in opening the websites and displays progress circle animation in the middle of its window.

Advertisement

Following screenshot shows Firefox displaying progress indicator (tiny circle animation) in the center of the window while trying to open a website:

Firefox_Taking_Long_Time_Opening_Websites_Upon_Startup.png

After a few seconds waiting, the website starts loading. Sometimes we need to close and re-open Firefox multiple times to make it open a website successfully.

[Problem 2] Firefox Trying to Access Various IP Addresses in Event Log

When this kind of problem occurs and if you check event log using Windows built-in event viewer or 3rd party system monitoring utilities, you find that Firefox was trying to access various IP addresses.

Sometimes as soon as you start your device, Firefox starts accessing those IP addresses even though you didn’t launch the browser.

[Problem Reason] Captive Portal Detection Checks Causing Websites Loading Delay

Such kind of issues occur in Firefox due to a built-in feature called “Captive Portal Detection“. This feature allows Firefox to regularly test the user’s Internet connection to identify whether the network connection requires login.

Following is the official description of the feature provided by Mozilla team:

Advertisement

Firefox’s captive portal detector tests whether the network connection requires you to log in. This is sometimes the case when using a public Wi-Fi hotspot. Firefox does this by regularly connecting to https://detectportal.firefox.com/canonical.html. Firefox will also make connections to this URL to check if your current network supports certain technologies such as IPv6.

A captive portal can be considered as a network that requires your action before it allows you to connect to the Internet. This action could be to log in using a username and password, or just to accept the network’s terms and conditions.

Most networks do this is by redirecting users to their custom pages. Firefox makes automatic connections to detect these redirects. When those happen, you will see a notification indicating that you may need to log into the network.

This is the reason, you see lots of weird IP address accessed by Firefox in the event log. The same reason causes delay while loading websites when you fresh start Firefox as it starts testing the connection.

[Solution] Disable or Turn Off Captive Portal Detection Checks in Firefox

If you are facing this issue and want to fix this annoying issue, you can safely disable Captive Portal Detection service in Firefox which will prevent Firefox from testing your network connection at startup and the websites will start opening instantly without any delay.

PS: You should disable the feature only if you are using the Internet connection at home or some safe place. If you are using a free public Wi-Fi connection, you should not disable this feature. Also Mozilla states that if you are using Mozilla VPN (virtual private network) service, you should not disable this feature otherwise the VPN service may fail to connect to network and may not work.

Mozilla team has provided a hidden secret preference/flag to completely disable and turn off Captive Portal Detection feature in Firefox. You can modify this preference to permanently disable Captive Portal Detection checks in your Firefox browser.

A similar issue was shared by a user at Mozilla support forum and our friend “jscher2000” provided a simple way to disable the Captive Portal Detection tests feature.

Following steps will help you in disabling Captive Portal Detection feature in Firefox:

1. Open Firefox and type about:config in the addressbar and press Enter. It’ll show you a warning message, click on “Accept the Risk and Continue” button. It’ll open Firefox’s hidden secret advanced configuration page i.e. about:config page.

2. Now type captive in Search filter box and you’ll see following preferences in the window:

captivedetect.canonicalContent

captivedetect.canonicalURL

captivedetect.maxRetryCount

captivedetect.maxWaitingTime

captivedetect.pollingTime

network.captive-portal-service.backoffFactor

network.captive-portal-service.enabled

network.captive-portal-service.maxInterval

network.captive-portal-service.minInterval

3. The above mentioned preferences are provided by Mozilla team to customize and change functionality of Captive Portal Detection tool in Firefox.

We just need to change the network.captive-portal-service.enabled preference to disable the entire feature.

Disable_Turn_Off_Captive_Portal_Detection_Service_Checks_Firefox.png

Double-click on the network.captive-portal-service.enabled preference and change its value to False. Alternatively, you can click on the Toggle icon given next to the preference name.

That’s it. It’ll completely disable the Captive Portal Detection service in Firefox and you should notice improvements in website loading time.

If you face any connection issue while opening some websites, you can re-enable the service by changing the above mentioned preference to True again.

Also Check:

Fix UI Scaling and Large Fonts Issues in Firefox 103 and Later Versions

Published in: Mozilla Firefox, Troubleshooting Guides

About the author: Vishal Gupta (also known as VG) has been awarded with Microsoft MVP (Most Valuable Professional) award. He holds Masters degree in Computer Applications (MCA). He has written several tech articles for popular newspapers and magazines and has also appeared in tech shows on various TV channels.

Comments

NOTE: Older comments have been removed to reduce database overhead. Be the first one to start the discussion.

Leave a Comment

Your email address will not be published. Required fields are marked *

NOTE: Your comment may not appear immediately. It'll become visible once we approve it.