I've installed local web server on my android tablet. But when all connections are off, every time I access the local site from built in browser (or Chrome), I get annoying popup message about "no internet connection" or something about sim card... is there any way to avoid that?
The name resolution for the localhost need not have to be done over the internet. Localhost can also use the host file to block certain websites. For this, the website to be blocked must be entered into the list and the IP address 127.0.
You are accesing localhost , meaning you have a web server running on your machine. To access it from Internet, you need to assign a public IP address to your machine. Then you can access http://<public_ip>:<port>/ . Port number is normally 80.
Whereas, a HTTP server is used to serve Internet pages across the Internet. The point is, no HTTP or FTP server can serve users without an Internet access. However, it “may” depend on personal preferences. For example, some Servers are configured to handle users' requests via LAN, Local Area Network.
Most Browsers will check for an Internet connection when they start. What you can do (depending on how you are planning to use it):
If you choose for an existing browser to modify, I would recommend lightning because (as a quick look at the strings.xml file would suggest) It does not check for an internet connection.
Problem may be caused by HTTP Proxy server. Proxies help to manage web traffic on the providers end, but can and probably will disrupt access to local addresses. Proxy options may be available in your network settings, but on many phones these options are hidden. An app such as HTTP Proxy Settings will give access to the hidden settings. Simply clear out the hostname and port for un-proxied access. Make sure to write down original values so changes can be undone.
If your device is configured to use a web proxy, then it'll never connect directly to localhost: it connects to the web proxy and asks that for the web page you really want. This won't work with a local web server.
To use a local web server, turn off your web proxy settings.
Original Answer
Original Answer #2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With