0xViking.eth 🔮 Profile picture
Feb 27 28 tweets 8 min read
Well, today let us see some more very basic yet important that we use daily and don't notice what happens in the background.

How does a WEB BROWSER work?
What is DNS, HTTP protocol?

You can start directly from 9/ tweet if you don't need basic introduction stuff.

🧵👇

1/ Image
Companies typically make free web-browsers with some financial interest in how you use their product.

With this, they are able to track your computing habits and make revenue by selling your data to third-party vendors

2/
Okay, what exactly is a web browser?

In short, it is the place where you interact with the web.

Remember: The words internet and web are not interchangeable, They are related but two different things
3/ Image
Internet is a network connection that helps you to connect to the web.

The web is basically anything like a website, the app you listen to music, place to play online games, video calling your friend, streaming any movie or watching a youtube video, etc.

4/
Well again to mention all of those mentioned applications need an Internet connection to access them but are not mandatory to use on WEB BROWSER.

5/
So web browsers are able to access sites that help you to see memes, watch youtube videos, post a comment on social media, etc. because they run on some standards and protocols

Go check out our last thread on Networking concepts to brush up about them


6/
So basically every website you visit will have the same standards to make sure that is accessible to people over the web.

Okay, let me explain each step on what happens when you visit a website by taking an example of you visiting youtube.

7/
I will also take a slight detour in between to explain a few other concepts when required.

As you know every web browser gives you a text box(address bar) on top of the application to enter the URL which you want to visit. So, in our case the URL is youtube.com

8/
When you type that site address and hit enter the website appears.

But when you hit enter there is a chain reaction of events that take place in a matter of seconds, nowadays not even a second.

Let's go step by step 👇

9/ Image
First of all, when you hit enter, the web browser has to find the location of the server where the site is stored/hosted.

so generally every domain we visit has a unique IP address assigned to it.

So what our browser does is, use a worldwide database service called DNS.

10/
BTW What is a DNS?

Domain Name System(DNS) is a service where it stores the domain name and corresponding IP address.

our browser will ask the DNS "Okay this is the domain name I wanted to load, can you give me the IP address for this?"

11/
Before directly querying on DNS, the browser checks for the IP address in multiple other places like browser cache, call to 'gethostbyname' library function(Varies with the OS) to check locally, then requests to ISP cache, etc.,

This is to make the process faster

12/ Image
So, once the browser gets the IP address of the site we want to visit, the computer(client) we are using will try to establish a connection with a computer where the site is stored/hosted(Server) using "Transmission Control Protocol(TCP)"

13/
The client will send a request to the server asking is it open for connections

If the server has open ports that connect the sub connection, it will acknowledge the request.

Finally, the client will send one more message acknowledging that it received server acknowledgment

14/ Image
Connection is established

Now, the client can request the web pages over the HyperText Transfer Protocol(HTTP)

Let's take a moment to know more about HTTP

"HTTP is a protocol for fetching resources such as HTML documents, the foundation of any data exchange on the Web"

15/
It is a client-server protocol, which means requests are initiated by the recipient, usually the Web browser.

A complete document is reconstructed from the different sub-documents fetched, for instance, text, layout description, images, videos, scripts, and more.

16/ Image
Clients and servers communicate by exchanging individual messages (as opposed to a stream of data).

The messages sent by the client, usually a Web browser, are called requests, and the messages sent by the server as an answer are called responses.

17/
BTW, we are assuming that the website is stored on a single server, but essentially nowadays large sites which are massively used will have multiple servers stored in building in multiple cities worldwide called data centers.

18/
Coming back, After the client request the server with an HTTP request the server will analyze the request and will build a response by collecting data from multiple sources like DBs, etc., usually in the form of HTML(HyperText Markup Language).

It can also be JSON, XML

19/
Now the server will send an HTTP response with the HTML page. back to the client who requested it.

Once the client gets a response from the server it will download the files server sent over the response.

Downloading alone will not be sufficient to see what we are seeing.

20/
So, Once the browser downloads multiple files like HTML, JS, CSS along with other media like videos, images, etc.

Now the browser will interpret these files and start to visually render them onto the screen.

Note server will only send the files not the rendered ones.

21/ Image
The browser will start with HTML interpretation, then add images and videos if any, and then using CSS it will build the layout of the site and starts styling with fonts and colors

Nowadays browsers are so fast, we can't even realize under the hood this is really happening

22/ Image
Browsers also do many other things, Like stores some of the information securely, check sites for viruses.

It also remembers the sites you visited and keeps a copy of them in a data cache so that the next time you visit the same site it would be faster to load.

23/
Well, you have converted the most basic thing that happens in our day-to-day life yet we don't notice it under our eyes.

Kudos to you 🎉for making it this far.

That brings an end to this thread

24/
Resources:

Video: by @treehouse

Overview on HTTP protocol -> developer.mozilla.org/en-US/docs/Web…

HTTP request and response headers ->
developer.mozilla.org/en-US/docs/Web…

25/
This thread is part of a Web3 Developer roadmap, Please have a look at it -> 0xviking.hashnode.dev/ultimate-roadm…
Thank you for reading till here.

I am a budding developer in web3, Started #21DaysOfLearnandShare to learn more and share.

If you like the content,
✅Like the first post
✅RETWEETS are appreciated
✅Please follow @0xViking for more such content

Thanks again
0xViking

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with 0xViking.eth 🔮

0xViking.eth 🔮 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @0xViking

Mar 1
Day-5(#R2D5)

Focusing on JavaScript alone can change your life.

JavaScript lets you become a:

✅ Frontend Developer
✅ Backend Developer
✅ Blockchain/Web3 Developer
✅ Game Developer
✅ Embedded Systems Engineer
✅ Mobile App Developer

Resources🧵👇
Yes, our main topic today is

"JAVASCRIPT"

This thread is part of the WEB3 developer roadmap.
bit.ly/WEB3-ROADMAP

#100DaysOfWeb3 #100DaysOfCode #web3 #developer #21DaysOfLearnandShare
As I told you already JS alone can change your life so I cannot restrict how many days you want to spend JS as part of the roadmap.

But If you decide to have strong building blocks in JS check:-

One of the best interactive courses I found by @scrimba

scrimba.com/learn/learnjav…
Read 13 tweets
Feb 28
Day-4(#R2D4)

Today's here are the resources about:-
HTTP Caching, RPC Protocol, Browser’s developer tools

As part of the WEB3 developer roadmap.
bit.ly/WEB3-ROADMAP

🧵👇

#100DaysOfWeb3 #100DaysOfCode #web3 #developer #21DaysOfLearnandShare
1/
Caching :

As yesterday mentioned our browser tries to check the local cache first to resolve DNS.

Similarly, there are CDN services that provide complete websites from their cache using the HTTP protocol.

cloudflare.com/en-in/learning…

2/
RPC Protocol :

Normally our programs and processes run locally in our system, but there are some protocols that support execution in a remote system. Such as RPC protocol, which makes it easy for the peer-to-peer networks.

guru99.com/remote-procedu…

3/ Image
Read 6 tweets
Jan 22
Have you recently heard the word "DeFi" or "Decentralized finance" and never know what is that or anything about it?

Well here i am, to help you understand the basic details of it in simple terms

So, Lets dive in "WTF is DeFi?"

👇🧵

1/
- In the previous "WTF is" thread about ETHEREUM part 1 i told that ethereum was created with the intention to decentralize everything.

- Smart Contracts help acheive decentralization of majority of things on blockchain.

Check this 👉bit.ly/WTFisSMARTCONT…

2/
- Financial system is one main thing that runs by centralized entities like governments and intermediaries like banks

- DeFi relies heavily on - Cryptography, Blockchain & Smart Contracts

- According to @defipulse today in DeFi Total Value Locked(TVL) is $92.36B 😱

3/
Read 24 tweets
Jan 21
Well in the last thread of "WTF is" about ETHEREUM we said it pioneered the concept of a blockchain smart contract platform.

But have you ever wondered what is this "SMART CONTRACTS" is and what it does?

Lets dive into this "WTF is SMART CONTRACTS?" thread and learn more

1/
In simple words Smart contracts are translations of an agreement, including terms and conditions into a computational code.

- The term "SMART CONTRACT" was coined by a well-known computer scientist, law scholar & cryptographer Nick Szabo( @NickSzabo4 ) in early 1990's.

2/
@NickSzabo4 - It is a piece of code that can be executed automatically in a deterministic way

- Usually stored and executed on the blockchain

- Smart contracts can store, send and receive crypto currency

- Even call other smart contracts

- Smart contracts once deployed are immutale

3/
Read 10 tweets
Jan 20
Have you ever wondered "WTF is ETHEREUM" and why was it created?

Ether the native currecny of Ethereum blockchain is the second largest cryptocurrency in the market share after bitcoin.

I don't think i can complete about ethereum in one thread, Will do it in parts.

👇🧵

1/ Image
In the previous "WTF is" threads i have explained about "Bitcoin" the first cryptocurrency ever created which inturn revolutionized the concept of underling technology "BLOCKCHAIN".

Have a look at that thread if you haven't till now at
👉bit.ly/WTFisBITCOIN

2/
Bitcoin was created to decentralize the money(General currecny we use now like USD, EUR etc.,)

It was sucessful in what it meant to do.

As of 20-01-2022 bitcoin marketmap is around $813,888,437,267 with share of 40.2% in number one place according to @CoinMarketCap

3/ Image
Read 15 tweets
Jan 19
Another day, another WTF is thread

In the last three threads we have seen about WEB3, BLOCKCHAIN and CRYPTOCURRECNY.

Today let's see about the the very first decentralized cryptocurrency ever created which is Bitcoin.

"WTF is BITCOIN?"

1/ Image
@Bitcoin was introduced to address the root problem with conventional currency and the trust that is required to make it work.

You can read this thread to understand how currency evolved over time 👉 bit.ly/WTFisCRYPTOCUR…

In General trust make systems brittle.

2/
@Bitcoin @Bitcoin originally was proposed in 2008 whitepaper* "Bitcoin: A Peer-to-Peer Electronic Cash System" by a person, or group of people, using the alias "Satoshi Nakamoto". It was launched in January 2009.

*Whitepapers explain the purpose and technology behind a project.

3/ Image
Read 39 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(