Closed Bug 339814 Opened 18 years ago Closed 10 years ago

Offline mode prevents access to localhost

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1140284

People

(Reporter: darin.moz, Assigned: bagder)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Advo])

Attachments

(1 file)

Offline mode prevents access to localhost Right now, we just have a global online/offline boolean to control whether or not we have the ability to open sockets and make DNS requests. This prevents us from browsing localhost while "offline". With auto-detection of offline mode, I think this bug will end up getting more visibility.
Seconded. Since Novell is shipping autodetection of the network status there are some reports that local webapplications are not accessible. This is nothing new. Bug 87717 is about the same problem.
Depends on: 87717
-> reassign to default owner
Assignee: darin.moz → nobody
is there anything that could be done about not being able to access localhost when there is no Internet connection? it is really anoying...! Because of this I HAVE TO use M$$ browser (or Opera...) :(((( and I like my Firefox very much...
You can manually uncheck "work offline".
It is darned annoying to have to manually uncheck "work offline" every time I start FF when I'm disconnected from the local network! Please provide an option to disable automatic switching to offline mode.
once you uncheck work offline, firefox no longer automatically switches between offline and online (until you restart it)
(In reply to comment #6) > once you uncheck work offline, firefox no longer automatically switches between > offline and online (until you restart it) This is true. But I don't keep FF open when I'm not using it, and as I stated it's darned annoying to have to uncheck the box each time I start it. As a Linux user, I find it quite unusual that a Linux app with the quality of FF is lacking a configuration option to disable having the app automatically make decisions like this for me.
In my case, "work offline" comes up selected whether I'm connected to a network or not. I have to un-check it every time I start Firefox in order to browse the web. The only thing I found that sort of fixed it was to have Network Manager running first, turn off offline mode there, then start Firefox. But that is only a per-session solution. Here is a list of discussions of the topic: http://ubuntuforums.org/showthread.php?t=767045 http://ubuntuforums.org/showthread.php?t=800179 http://support.mozilla.com/tiki-view_forum_thread.php?comments_parentId=11503&fo rumId=1
Darin: isn't this a dupe of Bug 87717?
Hello, Im using Firefox 3.0.1 and Windows XP and I use a lot local websites with no internet connection. I have the Offline problem all the time and I have to uncheck the work offline option. But everytime I restart Firefox I have to do the same again. I tried with localhost and with 127.0.0.1 and everytime happens the same. Why this option is not saved and how I can solve this problem? Is that a bug?
Have there been any updates to this? This is also driving me crazy.
We need to break out the user data by platform. I have a feeling linux users feel it more because they have some new network-detection features...
The problem has largely gone away for me. Firefox still gets into offline mode, but only when I start it with the network down, which makes more sense. I've changed a lot of stuff, and I don't know what change improved the situation. Here is what I can think of: I'm now running Ubuntu 8.04 Hardy Heron; when I reported before, I was at 7.10 Gutsy Gibbon. I also updated Firefox from 3.0 to 3.0.1. Besides that, I did a sort of purge of files from my ~/.mozilla/firefox/ directory, that seemed no longer to be used. But... Windows users are reporting a similar problem with FF 3.0.1... the common denominator would be the .mozilla/firefox directory...
benc is right: on Linux, Firefox now responds to dbus messages from Network Manager, which means that if you disconnect the network cable, Firefox goes offline and you can't access your locally-served resources. I think an exception for 127.0.0.1 and localhost would cover 99% of the cases. We could even make the list of exceptions a pref for the tiny number of people who have other local aliases for their own machine. Gerv
I experienced this when travelling by train. After booting my Ubuntu Hardy Heron system, it detects no wired (default) or wireless networks and therefore Firefox 3 is set to normal mode. When the train stops at a station that has a wireless network, even though I don't (try to)access it, the system is not really influenced by this. However when the wireless network goes out of reach, Firefox detects the network has gone when accessing localhost and switches to 'working offline'. In short, like many other argue, Firefox accessing localhost should not be effected by this. I would like to propose, like others, that accessing localhost is considered like accessing an URL on the local file system. If one really needs the behaviour that localhost is considered an external URL, it should be possible to enable this functionality somewhere in the preference menu's.
Perhaps another issue, but slightly related to this is, is caching for localhost. Should caching be used for local files and localhost usage? For developers it is desirable to have caching disabled in these cases. For normal users and in general, not using cache in these cases is probably faster anyway.
Firefox (and other Gecko apps) on OS X now has auto-detection of network link and go into offline mode when you lose network connectivity. This bug is extremely annoying if you're developing something with a local server.
This bug has now increased with recent upgrade to 3.0.5 using windows vista after upgrade I can't even use localhost as it is blocked in both offline and online mode. I have downloaded and installed opera but I am a FF Fanboy and don't like to have other browsers on my computer. I think you need to fix this bug asap as I have been looking at other browsers as an alternative to firefox. If I am I know other people are also. I run Apache webserver with php and mysql and use dreamweaver to develop websites. I have come to rely on Firefox as a primary web development tool and this just flat out makes me disgusted that the problem has been known about for a long time and not addressed and now it is worse.
Problem came back in an upgrade to Ubuntu 8.10 Intrepid. Solution (again): un-install Networkmanager (no big loss there).
Seems resonable to have cache disabled for anything that gets translated into 127.0.0.1. After all it's almost like loading a file from disk anyway.
Just a thought, but maybe there could be something like: browser.cache.offline.disable_on='localhost, 127.0.0.1' and/or browser.offline.never_offline_on='localhost, 127.0.0.1' (similar to network.proxy.no_proxies_on)
(In reply to comment #21) > Seems resonable to have cache disabled for anything that gets translated into > 127.0.0.1. After all it's almost like loading a file from disk anyway. I don't agree. If web developers want to test their cache headers on localhost server the behavior will be different from what is expected normally when address of the same configured server is not localhost. (In reply to comment #22) > Just a thought, but maybe there could be something like: > browser.cache.offline.disable_on='localhost, 127.0.0.1' > and/or > browser.offline.never_offline_on='localhost, 127.0.0.1' > > (similar to network.proxy.no_proxies_on) To fix this bug is not that simple and have option like this as well. When necko gets to offline mode DNS and socket service get shutdown. It means we cannot resolve localhost to 127.0.0.1 (ipv4) or ::1 (ipv6) and even we could we cannot run any connections to it. This would mean complex rebuild of the necko infrastructure. There is workaround for this described in comment 6.
Perhaps an intermediate solution would be to add a button to the error message -- right next to "try again". I'm bitten by this bug every single day, since I run Sage from localhost (math software with an html interface) on my laptop, and I'm frequently on the move.
Checkout this extension: http://multi.nadenade.com/leafy/Mozilla/Offline/ After few months of testing this I can say it works-for-me :-).
(In reply to comment #25) > Checkout this extension: > http://multi.nadenade.com/leafy/Mozilla/Offline/ > After few months of testing this I can say it works-for-me :-). I don't think this fixes this bug somehow.
Group: mozilla-confidential
Would a sensible, quick first step for this problem be to allow users to completely turn off offline mode all the time, in an about:config setting? (I don't see one right now). This would allow people to not have to hit "uncheck work offline" each time they fire up the browser. It's a blunt hammer, but it may be better than the current behavior for the small subset of users who are getting bit by this bug every day.
Sorry, my wild mouse click set this to be a "confidential" bug. Removing.
Group: mozilla-confidential
Also run into this annoying behavior :( IMHO with HTML5 and its offline modes coming into play soon, this might be more then annoyance. Offline mode should be triggered per site when there is no connection with the site (after a request has failed) and this will solve the localhost problem as well, and the wifi stability people are complaining on http://support.mozilla.com/tiki-view_forum_thread.php?comments_parentId=11503&forumId=1
Blocks: cuts-cruft
No longer depends on: cuts-cruft
No longer blocks: 583386
Work around is having a 3g stick. It's been 2 years that bug is reported but no action. Do you live in a place where everywhere covered with wifi? Don't you bother 33 bug reports.
Whiteboard: [Advo]
is this a dup of 87717 (which was fixed in ff18)?
It would seem sensible for Firefox to see if a connection to a site is possible each and every time one is typed into the URL bar - and come out of automatic offline mode if one is. I use XAMPP to run a local wiki and a wordpress journal, and I often do so with my laptop's WiFi turned off to save energy. Firefox starts in offline mode whenever WiFi is disabled and so refuses to attempt a connection to even local sites even if I type their address into the URL bar several times. Only going onto that page and specifically pressing 'Try Again' brings it out of offline mode and allows it to access local sites.
I believe automatically switching to offline mode is a bad idea in general and that's what's causing problems such as this. If "offline" means don't try to resolve anything nor use any sockets, then switching on offline mode should only be done by a more active decision from a user (or script or whatever). This is related to bug 939318
Contents of my /etc/hosts is as follows: 127.0.1.1 amidea.dev amidea sanad.sanad.amidea.dev Firefox is NOT in Offline Mode, however with the network disconnected I'm unable to access a local site using Firefox v30. Firefox requires network connection to even browse local sites resolving to 127.0.1.1/127.0.0.1. Chrome (v35) can access the site normally as depicted in the screenshot. Occurs in Linux Mint 17 64-bit. Should I report a new bug? Because this happens irrespective of Work Offline checked or not. Bug 339814 seems to only cater to when Work Offline is checked.
I've found another bug that is exactly as my issue, which is Bug 698302 (almost similar but different than this one), reported 3 years ago (!!!).
Depends on: 1140284
The problem with using "localhost" that occurs when in offline mode should be fixed with the fix from bug 1140284 (inbound just now). If someone still suffers from this problem even after using that fix, I would like to know how to repeat it! Problems with accessing local hosts while in offline mode using _other_ hostnames than "localhost" is the problem mentioned in Bug 698302 and is not covered by this specific bug report.
Assignee: nobody → daniel
I consider this closed as well with the fix from bug 1140284.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Resolution: FIXED → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: