retrohacker / peerweb

Welcome to the Decentralized Web
http://will.blankenship.io/peerweb
MIT License
118 stars 9 forks source link

protocol-less websites don't load #35

Open retrohacker opened 8 years ago

retrohacker commented 8 years ago

To start out, we could simply assume that https was the default protocol. Moving forward, we could make it a little more intelligent.

Repro:

  1. go to navbar
  2. type www.webtorrent.io
  3. press enter, notice nothing happens
  4. change to http://www.webtorrent.io
  5. press enter, note that it now works
retrohacker commented 8 years ago

@phoenix1796 want to take a pass at this? It touches a little bit of the UI layer and (potentially) the protocol layer.

phoenix1796 commented 8 years ago

Tried this , but , now if we choose https as the default protocol and navigate to a site with only http support (For example , will.blankenship.io/peerweb/) . it displays a blank page instead of automatically redirecting to the http variant . But , atleast for now , URLs like google.com , fb.com etc. open up fine.

retrohacker commented 8 years ago

Awesomesauce! That is fine for me right now. I wonder how web browsers do it? Do they assume http and let 3XX redirects handle passing the user to HTTPS?

phoenix1796 commented 8 years ago

Firefox gives a warning about the page not being secure and stops us there , Same goes for Chrome (It tells us "Your connection is not private" and stops us there)