Firefox Local Mode
93 points by lim
93 points by lim
Knowing this exists, I think it would be nice if there was some automatic reload-on-write functionality. I have some clunky script for this but I think the browser itself would be the best place to implement this robustly.
It is not as useful as I initially expected; I have to keep the developer tools running, and I do not see why I should use this instead of simply running "python -m http.server." Am I missing something?
Am I missing something?
This makes it easy to test all Web APIs, including the ones being restricted to Secure Contexts (i.e. using https)
Isn’t http://localhost:* normally considered a secure context?
It is, but not http://172.16.x.y which can be a container with specific tools on my machine (the same could apply for a machine on your LAN at work for instance).
I didn't realize that this could be controlled by preferences. I currently set preferences via Nix. I wonder if it would be useful for deploying static sites to my desktop in an easy-to-use with with a secure origin.
For example I currently deploy Element-web to my server. But why bother going over the network if I could just deploy it to my Firefox config!
I don't have many static sites that I run just for me but it does sound like an interesting approach.
I installed Firefox to test this because it seemed convenient, but... it just doesn't work? It listed the files in the folder, but clicking any of them results in a "failed to load" error. Using their default firefox.localhost name also resulted in a security error.
I'll stick to cloudflared tunnel --url http://localhost:8080.
I use python3 -m http.server. (You can adjust the host and port as needed.) Super easy and simple.
This feature in firefox seems very tailored to easily serving content over https for development. python3 -m http.server does not use https unfortunately, which is becoming increasingly important since many web features (like service workers) are disabled or neutered on "insecure" http websites. Caddy is another good alternative when https is needed.
Doesn’t firefox allow that stuff on localhost?
Yeah, you're right. It becomes a problem if other devices on the same network need access to the server, but that would not really be possible with the "local mode" from the article, so I agree that a http server on localhost achieves the same thing in this scenario.