banner



Is A Computer That Provides Resources Or Services Upon Request From Another Computer Or Device.

How the Spider web works

  • Previous
  • Overview: Getting started with the web

How the spider web works provides a simplified view of what happens when you view a webpage in a spider web browser on your reckoner or phone.

This theory is not essential to writing web code in the short term, but before long you'll really start to benefit from understanding what's happening in the background.

Clients and servers

Computers connected to the spider web are called clients and servers. A simplified diagram of how they interact might look similar this:

Two circles representing client and server. An arrow labelled request is going from client to server, and an arrow labelled responses is going from server to client

  • Clients are the typical web user'due south cyberspace-continued devices (for example, your computer connected to your Wi-Fi, or your phone connected to your mobile network) and web-accessing software available on those devices (commonly a web browser like Firefox or Chrome).
  • Servers are computers that store webpages, sites, or apps. When a client device wants to access a webpage, a copy of the webpage is downloaded from the server onto the customer machine to be displayed in the user's web browser.

The customer and server we've described above don't tell the whole story. At that place are many other parts involved, and we'll describe them beneath.

For now, let's imagine that the web is a road. On one finish of the road is the client, which is similar your house. On the other end of the road is the server, which is a store y'all want to buy something from.

In addition to the client and the server, we also need to say how-do-you-do to:

  • Your internet connection: Allows you to ship and receive data on the web. It'southward basically like the street betwixt your house and the shop.
  • TCP/IP: Transmission Control Protocol and Internet Protocol are communication protocols that define how data should travel beyond the internet. This is like the transport mechanisms that let yous identify an order, go to the store, and buy your appurtenances. In our example, this is like a car or a wheel (or however else you might get effectually).
  • DNS: Domain Name System is similar an address book for websites. When you type a spider web address in your browser, the browser looks at the DNS to find the website's IP address before it can retrieve the website. The browser needs to find out which server the website lives on, then it can send HTTP letters to the right place (see below). This is similar looking upwardly the address of the shop so yous can admission it.
  • HTTP: Hypertext Transfer Protocol is an awarding protocol that defines a linguistic communication for clients and servers to speak to each other. This is like the language you lot use to order your goods.
  • Component files: A website is made upwards of many unlike files, which are like the different parts of the appurtenances you buy from the shop. These files come in ii principal types:
    • Lawmaking files: Websites are built primarily from HTML, CSS, and JavaScript, though you'll meet other technologies a bit later.
    • Assets: This is a collective name for all the other stuff that makes up a website, such as images, music, video, Word documents, and PDFs.

Then what happens, exactly?

When yous blazon a web address into your browser (for our analogy that'due south similar walking to the shop):

  1. The browser goes to the DNS server, and finds the real accost of the server that the website lives on (yous detect the address of the shop).
  2. The browser sends an HTTP request message to the server, asking it to send a copy of the website to the client (you go to the shop and order your goods). This message, and all other data sent between the customer and the server, is sent across your internet connection using TCP/IP.
  3. If the server approves the customer's request, the server sends the client a "200 OK" message, which ways "Of course you can look at that website! Hither information technology is", so starts sending the website'southward files to the browser every bit a series of minor chunks called information packets (the shop gives you your goods, and you lot bring them dorsum to your house).
  4. The browser assembles the small chunks into a complete web page and displays it to you (the goods get in at your door — new shiny stuff, awesome!).

Gild in which component files are parsed

When browsers send requests to servers for HTML files, those HTML files often contain <link> elements referencing external CSS stylesheets and <script> elements referencing external JavaScript scripts. It's important to know the order in which those files are parsed by the browser as the browser loads the page:

  • The browser parses the HTML file first, and that leads to the browser recognizing whatsoever <link>-chemical element references to external CSS stylesheets and any <script>-element references to scripts.
  • As the browser parses the HTML, it sends requests back to the server for any CSS files it has establish from <link> elements, and any JavaScript files it has found from <script> elements, and from those, then parses the CSS and JavaScript.
  • The browser generates an in-memory DOM tree from the parsed HTML, generates an in-retention CSSOM structure from the parsed CSS, and compiles and executes the parsed JavaScript.
  • As the browser builds the DOM tree and applies the styles from the CSSOM tree and executes the JavaScript, a visual representation of the folio is painted to the screen, and the user sees the page content and can begin to interact with it.

DNS explained

Existent web addresses aren't the dainty, memorable strings you type into your accost bar to detect your favorite websites. They are special numbers that look like this: 63.245.215.20.

This is chosen an IP address, and information technology represents a unique location on the web. However, it's not very piece of cake to remember, is it? That's why Domain Proper noun Servers were invented. These are special servers that lucifer up a web address you type into your browser (similar "mozilla.org") to the website's real (IP) address.

Websites can exist reached directly via their IP addresses. You tin detect the IP accost of a website by typing its domain into a tool similar IP Checker.

Packets explained

Before we used the term "packets" to describe the format in which the data is sent from server to customer. What do we mean here? Basically, when information is sent across the web, it is sent in thousands of small chunks. There are multiple reasons why data is sent in small packets. They are sometimes dropped or corrupted, and information technology's easier to replace small chunks when this happens. Additionally, the packets can be routed along dissimilar paths, making the exchange faster and allowing many unlike users to download the same website at the same time. If each website was sent as a single big chunk, only one user could download it at a fourth dimension, which obviously would make the web very inefficient and not much fun to use.

Run into as well

  • How the Internet works
  • HTTP — an Application-Level Protocol
  • HTTP: Allow's GET It On!
  • HTTP: Response Codes

Credit

In this module

  • Installing basic software
  • What will your website look like?
  • Dealing with files
  • HTML basics
  • CSS basics
  • JavaScript nuts
  • Publishing your website
  • How the web works

Source: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/How_the_Web_works

Posted by: adamssposee1993.blogspot.com

0 Response to "Is A Computer That Provides Resources Or Services Upon Request From Another Computer Or Device."

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel