The Computer Oracle

How does one browse a website using Telnet?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Horror Game Menu Looping

--

Chapters
00:00 How Does One Browse A Website Using Telnet?
00:25 Accepted Answer Score 13
01:36 Thank you

--

Full question
https://superuser.com/questions/933346/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#commandline #browser #telnet

#avk47



ACCEPTED ANSWER

Score 13


When you use Telnet, you're opening an almost raw TCP connection to the server. This means that you have to make HTTP requests like your browser does to get the information that you need.

Try this:

> telnet google.com 80

You should get an empty window with a blinking cursor at the top. Now type this in:

GET / HTTP/1.1

and press Enter twice to send the line and end the request with an empty line. You won't be able to see what you're typing, though, because the server is not echoing back what you're typing (but the Telnet client moves the cursor for you).

You should get your response in HTML. Extra points if you can save it to a file and open it in a browser.

So then, what's Lynx? Lynx does exactly what your browser does: send requests, get the response, parse the HTML, and show it to the user. But this is all done in a command-line interface, which makes it difficult to align objects and format them correctly.

Telnet, on the other hand, just handles the requesting and responding part, which is why only crazy people browse the Web with just Telnet.