2

I use a text editor to develop a website (Brackets), I can test on Chrome and change screen size on Chrome, but I want to test on my actual iPhone.

If I try to go to the address : http://127.0.0.1:49371/index.html on the mobile, it will not load (only on my mac). They use the same Wifi.

  • 3
    Why can't you upload it somewhere and test it on the phone in a staging site? – Steve Dec 15 '18 at 2:10
  • 3
    @Curnelious Maximillian is correct, 127.0.0.1 is a localhost IP address and will only work on the same computer the web server is running on. Likely you're on a network with NAT and have a private IP address assigned to each device. You'll need to use the private IP address of the computer with the web server running on it instead (e.g., 192.168.0.2). You'll also need to make sure there isn't a firewall blocking port 49371, which may still work on the same computer but not when connecting from an external device on the network. – dan Dec 15 '18 at 6:25
  • Thanks a lot. Being told there are websites that do that for you. – Curnelious Dec 15 '18 at 6:32
1

You will need to use the real local ip address of the computer (not the loopback 127.0.0.1) and make sure it is serving over the lan. More info:

Stack Overflow - How can I access my localhost from my Android device?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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