Localhost does not work in Chrome, 127.0.0.1 works

I am trying to start a local node server, but for some reason localhost:3000does not work. The error page indicated This webpage is not available ERR_CONNECTION_CLOSEDhowever 127.0.0.1:3000works. I tried to make changes to my hosts file, but to no avail. Does anyone know what causes the problem?

Chrome version - 46.0.2490.80 m

+4
source share
2 answers

Here are the steps I took to work correctly:

  • I edited the file of my hosts, so I was 127.0.0.1 localhost.present and saved the file
  • Cleared the Chrome cache, in particular cookies and cached files.
  • Flushed Host Cache chrome://net-internals/#dns
  • Restarted chrome

Alternatively, this also works:

  • chrome://net-internals/# hsts
  • " " localhost

, HSTS, cookie HSTS

+9

-, , .

+1

Source: https://habr.com/ru/post/1614469/


All Articles