The Internet Flashcards

1
Q

Domain Name System (DNS)

A

the phonebook of the Internet. Humans access information online through domain names, like nytimes.com or espn.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources.

Each device connected to the Internet has a unique IP address which other machines use to find the device. DNS servers eliminate the need for humans to memorize IP addresses such as 192.168.1.1 (in IPv4), or more complex newer alphanumeric IP addresses such as 2400:cb00:2048:1::c629:d7a2 (in IPv6).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How Does DNS Work?

A

The process of DNS resolution involves converting a hostname (such as www.example.com) into a computer-friendly IP address (such as 192.168.1.1). An IP address is given to each device on the Internet, and that address is necessary to find the appropriate Internet device - like a street address is used to find a particular home. When a user wants to load a webpage, a translation must occur between what a user types into their web browser (example.com) and the machine-friendly address necessary to locate the example.com webpage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

DNS server to load webpage:
DNS Recursor

A

The recursor can be thought of as a librarian who is asked to go find a particular book somewhere in a library. The DNS recursor is a server designed to receive queries from client machines through applications such as web browsers. Typically the recursor is then responsible for making additional requests in order to satisfy the client’s DNS query.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

DNS server to load webpage:
Root nameserver

A

The root server is the first step in translating (resolving) human readable host names into IP addresses. It can be thought of like an index in a library that points to different racks of books - typically it serves as a reference to other more specific locations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

DNS server to load webpage:
TLD nameserver

A

The top level domain server (TLD) can be thought of as a specific rack of books in a library. This nameserver is the next step in the search for a specific IP address, and it hosts the last portion of a hostname (In example.com, the TLD server is “com”).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

DNS server to load webpage:
Authoritative nameserver

A

This final nameserver can be thought of as a dictionary on a rack of books, in which a specific name can be translated into its definition. The authoritative nameserver is the last stop in the nameserver query. If the authoritative name server has access to the requested record, it will return the IP address for the requested hostname back to the DNS Recursor (the librarian) that made the initial request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What’s the difference between an authoritative DNS server and a recursive DNS resolver?

A

Both concepts refer to servers (groups of servers) that are integral to the DNS infrastructure, but each performs a different role and lives in different locations inside the pipeline of a DNS query. One way to think about the difference is the recursive resolver is at the beginning of the DNS query and the authoritative nameserver is at the end.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Recursive DNS resolver

A

The recursive resolver is the computer that responds to a recursive request from a client and takes the time to track down the DNS record. It does this by making a series of requests until it reaches the authoritative DNS nameserver for the requested record (or times out or returns an error if no record is found). Luckily, recursive DNS resolvers do not always need to make multiple requests in order to track down the records needed to respond to a client; caching is a data persistence process that helps short-circuit the necessary requests by serving the requested resource record earlier in the DNS lookup.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Authoritative DNS Server

A

Put simply, an authoritative DNS server is a server that actually holds, and is responsible for, DNS resource records. This is the server at the bottom of the DNS lookup chain that will respond with the queried resource record, ultimately allowing the web browser making the request to reach the IP address needed to access a website or other web resources. An authoritative nameserver can satisfy queries from its own data without needing to query another source, as it is the final source of truth for certain DNS records.

in instances where the query is for a subdomain such as foo.example.com or blog.cloudflare.com, an additional nameserver will be added to the sequence after the authoritative nameserver, which is responsible for storing the subdomain’s CNAME record.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The 8 steps in a DNS lookup

A

A user types ‘example.com’ into a web browser and the query travels into the Internet and is received by a DNS recursive resolver.

The resolver then queries a DNS root nameserver (.).

The root server then responds to the resolver with the address of a Top Level Domain (TLD) DNS server (such as .com or .net), which stores the information for its domains. When searching for example.com, our request is pointed toward the .com TLD.

The resolver then makes a request to the .com TLD.

The TLD server then responds with the IP address of the domain’s nameserver, example.com.

Lastly, the recursive resolver sends a query to the domain’s nameserver.

The IP address for example.com is then returned to the resolver from the nameserver.

The DNS resolver then responds to the web browser with the IP address of the domain requested initially.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Once the 8 steps of the DNS lookup have returned the IP address for example.com, the browser is able to make the request for the web page:

A

The browser makes a HTTP request to the IP address.

The server at that IP returns the webpage to be rendered in the browser (step 10).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a DNS resolver?

A

The DNS resolver is the first stop in the DNS lookup, and it is responsible for dealing with the client that made the initial request. The resolver starts the sequence of queries that ultimately leads to a URL being translated into the necessary IP address.

Note: A typical uncached DNS lookup will involve both recursive and iterative queries.

It’s important to differentiate between a recursive DNS query and a recursive DNS resolver. The query refers to the request made to a DNS resolver requiring the resolution of the query. A DNS recursive resolver is the computer that accepts a recursive query and processes the response by making the necessary requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

DNS query:
Recursive query

A

In a recursive query, a DNS client requires that a DNS server (typically a DNS recursive resolver) will respond to the client with either the requested resource record or an error message if the resolver can’t find the record.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

DNS query:
Iterative query

A

in this situation the DNS client will allow a DNS server to return the best answer it can. If the queried DNS server does not have a match for the query name, it will return a referral to a DNS server authoritative for a lower level of the domain namespace. The DNS client will then make a query to the referral address. This process continues with additional DNS servers down the query chain until either an error or timeout occurs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

DNS query:
Non-recursive query

A

typically this will occur when a DNS resolver client queries a DNS server for a record that it has access to either because it’s authoritative for the record or the record exists inside of its cache. Typically, a DNS server will cache DNS records to prevent additional bandwidth consumption and load on upstream servers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is DNS caching? Where does DNS caching occur?

A

The purpose of caching is to temporarily stored data in a location that results in improvements in performance and reliability for data requests. DNS caching involves storing data closer to the requesting client so that the DNS query can be resolved earlier and additional queries further down the DNS lookup chain can be avoided, thereby improving load times and reducing bandwidth/CPU consumption. DNS data can be cached in a variety of locations, each of which will store DNS records for a set amount of time determined by a time-to-live (TTL).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Browser DNS caching

A

Modern web browsers are designed by default to cache DNS records for a set amount of time. The purpose here is obvious; the closer the DNS caching occurs to the web browser, the fewer processing steps must be taken in order to check the cache and make the correct requests to an IP address. When a request is made for a DNS record, the browser cache is the first location checked for the requested record.

In Chrome, you can see the status of your DNS cache by going to chrome://net-internals/#dns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Operating system (OS) level DNS caching

A

The operating system level DNS resolver is the second and last local stop before a DNS query leaves your machine. The process inside your operating system that is designed to handle this query is commonly called a “stub resolver” or DNS client. When a stub resolver gets a request from an application, it first checks its own cache to see if it has the record. If it does not, it then sends a DNS query (with a recursive flag set), outside the local network to a DNS recursive resolver inside the Internet service provider (ISP).

When the recursive resolver inside the ISP receives a DNS query, like all previous steps, it will also check to see if the requested host-to-IP-address translation is already stored inside its local persistence layer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

The recursive resolver also has additional functionality depending on the types of records it has in its cache:

A

If the resolver does not have the A records, but does have the NS records for the authoritative nameservers, it will query those name servers directly, bypassing several steps in the DNS query. This shortcut prevents lookups from the root and .com nameservers (in our search for example.com) and helps the resolution of the DNS query occur more quickly.

If the resolver does not have the NS records, it will send a query to the TLD servers (.com in our case), skipping the root server.

In the unlikely event that the resolver does not have records pointing to the TLD servers, it will then query the root servers. This event typically occurs after a DNS cache has been purged.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is a domain name?

A

a string of text that maps to an alphanumeric IP address, used to access a website from client software. In plain English, a domain name is the text that a user types into a browser window to reach a particular website. For instance, the domain name for Google is ‘google.com’.

The actual address of a website is a complex numerical IP address (e.g. 192.0.2.2), but thanks to DNS, users are able to enter human-friendly domain names and be routed to the websites they are looking for. This process is known as a DNS lookup.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Who managed domain names?

A

Domain names are all managed by domain registries, which delegate the reservation of domain names to registrars. Anyone who wants to create a website can register a domain name with a registrar, and there are currently over 300 million registered domain names.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is the difference between a domain name and a URL?

A

A uniform resource locator (URL), sometimes called a web address, contains the domain name of a site as well as other information, including the protocol and the path. For example, in the URL ‘https://cloudflare.com/learning/’, ‘cloudflare.com’ is the domain name, while ‘https’ is the protocol and ‘/learning/’ is the path to a specific page on the website.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What are the parts of a domain name?

A

Domain names are typically broken up into two or three parts, each separated by a dot. When read right-to-left, the identifiers in domain names go from most general to most specific. The section to the right of the last dot in a domain name is the top-level domain (TLD). These include the ‘generic’ TLDs such as ‘.com’, ‘.net’, and ‘.org’, as well as country-specific TLDs like ‘.uk’ and ‘.jp’.

To the left of the TLD is the second-level domain (2LD) and if there is anything to the left of the 2LD, it is called the third-level domain (3LD). Let’s look at a couple of examples:

For Google’s US domain name, ‘google.com’:

’.com’ is the TLD (most general)
’google’ is the 2LD (most specific)
But for Google UK’s domain name, ‘google.co.uk’:

’.com’ is the TLD (most general)
’.co’* is the 2LD
’google’ is the 3LD (most specific)
*In this case, the 2LD indicates the type of organization that registered the domain (.co in the UK is for sites registered by companies).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

How to keep a domain name secure?

A

Once a domain name has been registered with a registrar, that registrar is in charge of notifying the registrant when their domain is about to expire and giving them the chance to renew, ensuring they do not lose their domain name. In some cases, registrars will prey on their users’ expired domain names by buying those domains the second they expire and then selling them back to the original registrant at an exorbitant price. It is important to choose an honest and trustworthy registrar to avoid these kinds of predatory practices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

web server

A

A computer that hosts a website on the Internet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

web page

A

simple document displayable by a browser. Such documents are written in the HTML language (which we look into in more detail in other articles). A web page can embed a variety of different types of resources such as:

style information — controlling a page’s look-and-feel
scripts — which add interactivity to the page
media — images, sounds, and videos.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

The term web server can refer to hardware or software, or both of them working together.

On the hardware side, a web server is a computer that stores web server software and a website’s component files (for example, HTML documents, images, CSS stylesheets, and JavaScript files). A web server connects to the Internet and supports physical data interchange with other devices connected to the web.

A

On the software side, a web server includes several parts that control how web users access hosted files. At a minimum, this is an HTTP server. An HTTP server is software that understands URLs (web addresses) and HTTP (the protocol your browser uses to view webpages). An HTTP server can be accessed through the domain names of the websites it stores, and it delivers the content of these hosted websites to the end user’s device.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

At the most basic level, whenever a browser needs a file that is hosted on a web server, the browser requests the file via HTTP. When the request reaches the correct (hardware) web server, the (software) HTTP server accepts the request, finds the requested document, and sends it back to the browser, also through HTTP. (If the server doesn’t find the requested document, it returns a 404 response instead.)

A

To publish a website, you need either a static or a dynamic web server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

static web server

A

or stack, consists of a computer (hardware) with an HTTP server (software). We call it “static” because the server sends its hosted files as-is to your browser.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

dynamic web server

A

consists of a static web server plus extra software, most commonly an application server and a database. We call it “dynamic” because the application server updates the hosted files before sending content to your browser via the HTTP server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Hosting files

A

First, a web server has to store the website’s files, namely all HTML documents and their related assets, including images, CSS stylesheets, JavaScript files, fonts, and video.

Technically, you could host all those files on your own computer, but it’s far more convenient to store files all on a dedicated web server because:

A dedicated web server is typically more available (up and running).
Excluding downtime and system troubles, a dedicated web server is always connected to the Internet.
A dedicated web server can have the same IP address all the time. This is known as a dedicated IP address. (Not all ISPs provide a fixed IP address for home lines.)
A dedicated web server is typically maintained by a third party.

32
Q

web server provides support for HTTP (Hypertext Transfer Protocol).

A

As its name implies, HTTP specifies how to transfer hypertext (linked web documents) between two computers.

33
Q

Protocol

A

set of rules for communication between two computers. HTTP is a textual, stateless protocol.

34
Q

stateless

A

Neither the server nor the client remember previous communications. For example, relying on HTTP alone, a server can’t remember a password you typed or remember your progress on an incomplete transaction. You need an application server for tasks like that. (We’ll cover that sort of technology in other articles.)

35
Q

HTTP provides clear rules for how a client and server communicate. We’ll cover HTTP itself in a technical article later. For now, just be aware of these things:

A

Usually only clients make HTTP requests, and only to servers. Servers respond to a client’s HTTP request. A server can also populate data into a client cache, in advance of it being requested, through a mechanism called server push.

When requesting a file via HTTP, clients must provide the file’s URL.

The web server must answer every HTTP request, at least with an error message.

36
Q

On a web server, the HTTP server is responsible for processing and answering incoming requests.

A

Upon receiving a request, an HTTP server checks if the requested URL matches an existing file.

If so, the web server sends the file content back to the browser. If not, the server will check if it should generate a file dynamically for the request (see Static vs. dynamic content).

If neither of these options are possible, the web server returns an error message to the browser, most commonly 404 Not Found. The 404 error is so common that some web designers devote considerable time and effort to designing 404 error pages.

37
Q

static vs dynamic content

A

a server can serve either static or dynamic content. Remember that the term static means “served as-is”. Static websites are the easiest to set up, so we suggest you make your first site a static site.

The term dynamic means that the server processes the content or even generates it on the fly from a database. This approach provides more flexibility, but the technical stack is more complex, making it dramatically more challenging to build a website.

It is impossible to suggest a single off-the-shelf application server that will be the right solution for every possible use case. Some application servers are designed to host and manage blogs, wikis, or e-commerce solutions, while others are more generic. If you’re building a dynamic website, take the time to research your requirements and find the technology that best fits your needs.

38
Q

Network

A

a group of computers or other devices which are connected to eachother. For example, you at your home might have a network of computers and devices. Your friend living next door might have a similar network of devices. Their neighbor might have a similar network of devices. All these networks when connected together form the internet.

39
Q

At a high level, the internet works by connecting devices and computer systems together using a set of standardized protocols. These protocols define how information is exchanged between devices and ensure that data is transmitted reliably and securely.

A

The core of the internet is a global network of interconnected routers, which are responsible for directing traffic between different devices and systems. When you send data over the internet, it is broken up into small packets that are sent from your device to a router. The router examines the packet and forwards it to the next router in the path towards its destination. This process continues until the packet reaches its final destination.

To ensure that packets are sent and received correctly, the internet uses a variety of protocols, including the Internet Protocol (IP) and the Transmission Control Protocol (TCP). IP is responsible for routing packets to their correct destination, while TCP ensures that packets are transmitted reliably and in the correct order.

In addition to these core protocols, there are a wide range of other technologies and protocols that are used to enable communication and data exchange over the internet, including the Domain Name System (DNS), the Hypertext Transfer Protocol (HTTP), and the Secure Sockets Layer/Transport Layer Security (SSL/TLS) protocol. As a developer, it is important to have a solid understanding of how these different technologies and protocols work together to enable communication and data exchange over the internet.

40
Q

Packet

A

A small unit of data that is transmitted over the internet.

41
Q

Router

A

A device that directs packets of data between different networks.

42
Q

IP Address

A

A unique identifier assigned to each device on a network, used to route data to the correct destination.

43
Q

Domain Name

A

A human-readable name that is used to identify a website, such as google.com.

44
Q

DNS

A

The Domain Name System is responsible for translating domain names into IP addresses.

45
Q

HTTP

A

The Hypertext Transfer Protocol is used to transfer data between a client (such as a web browser) and a server (such as a website).

46
Q

HTTPS

A

An encrypted version of HTTP that is used to provide secure communication between a client and server.

47
Q

SSL/ TLS

A

The Secure Sockets Layer and Transport Layer Security protocols are used to provide secure communication over the internet.

48
Q

Protocols play a critical role in enabling communication and data exchange over the internet. A protocol is a set of rules and standards that define how information is exchanged between devices and systems.

A

There are many different protocols used in internet communication, including the Internet Protocol (IP), the Transmission Control Protocol (TCP), the User Datagram Protocol (UDP), the Domain Name System (DNS), and many others.

49
Q

IP is responsible for routing packets of data to their correct destination, while TCP and UDP ensure that packets are transmitted reliably and efficiently. DNS is used to translate domain names into IP addresses, and HTTP is used to transfer data between clients and servers.

A

One of the key benefits of using standardized protocols is that they allow devices and systems from different manufacturers and vendors to communicate with each other seamlessly. For example, a web browser developed by one company can communicate with a web server developed by another company, as long as they both adhere to the HTTP protocol.

50
Q

HTTP (Hypertext Transfer Protocol) and HTTPS (HTTP Secure) are two of the most commonly used protocols in internet-based applications and services.

A

HTTP is the protocol used to transfer data between a client (such as a web browser) and a server (such as a website). When you visit a website, your web browser sends an HTTP request to the server, asking for the webpage or other resource you’ve requested. The server then sends an HTTP response back to the client, containing the requested data.

51
Q

HTTPS is a more secure version of HTTP, which encrypts the data being transmitted between the client and server using SSL/TLS (Secure Sockets Layer/Transport Layer Security) encryption. This provides an additional layer of security, helping to protect sensitive information such as login credentials, payment information, and other personal data.

A

When you visit a website that uses HTTPS, your web browser will display a padlock icon in the address bar, indicating that the connection is secure. You may also see the letters “https” at the beginning of the website address, rather than “http”.

52
Q

TCP/IP (Transmission Control Protocol/Internet Protocol) is the underlying communication protocol used by most internet-based applications and services.

A

It provides a reliable, ordered, and error-checked delivery of data between applications running on different devices.

53
Q

Ports

A

Ports are used to identify the application or service running on a device. Each application or service is assigned a unique port number, allowing data to be sent to the correct destination.

54
Q

Sockets

A

A socket is a combination of an IP address and a port number, representing a specific endpoint for communication. Sockets are used to establish connections between devices and transfer data between applications.

55
Q

Connections

A

A connection is established between two sockets when two devices want to communicate with each other. During the connection establishment process, the devices negotiate various parameters such as the maximum segment size and window size, which determine how data will be transmitted over the connection.

56
Q

Data transfer

A

Once a connection is established, data can be transferred between the applications running on each device. Data is typically transmitted in segments, with each segment containing a sequence number and other metadata to ensure reliable delivery.

57
Q

When building applications with TCP/IP, you’ll need to ensure that your application is designed to work with the appropriate ports, sockets, and connections. You’ll also need to be familiar with the various protocols and standards that are commonly used with TCP/IP, such as HTTP, FTP (File Transfer Protocol), and SMTP (Simple Mail Transfer Protocol).

A

Understanding these concepts and protocols is essential for building effective, scalable, and secure internet-based applications and services.

58
Q

Certificates

A

SSL/TLS certificates are used to establish trust between the client and server. They contain information about the identity of the server and are signed by a trusted third party (a Certificate Authority) to verify their authenticity.

59
Q

Handshake

A

During the SSL/TLS handshake process, the client and server exchange information to negotiate the encryption algorithm and other parameters for the secure connection.

60
Q

Encryption

A

Once the secure connection is established, data is encrypted using the agreed-upon algorithm and can be transmitted securely between the client and server.

61
Q

When building internet-based applications and services, it’s important to understand how SSL/TLS works and to ensure that your application is designed to use SSL/TLS when transmitting sensitive data such as login credentials, payment information, and other personal data.

A

You’ll also need to ensure that you obtain and maintain valid SSL/TLS certificates for your servers, and that you follow best practices for configuring and securing your SSL/TLS connections. By doing so, you can help protect your users’ data and ensure the integrity and confidentiality of your application’s communication over the internet.

62
Q

The last mile

A

the part of the internet that connects homes and small businesses to the internet. Currently, about 60 percent of residential internet connections in the United States are provided by cable TV companies such as Comcast and Time Warner. Of the remaining 40 percent, a growing fraction use new fiber optic cables, most of which are part of Verizon’s FiOS program or AT&T’s U-Verse. Finally, a significant but shrinking number use outdated DSL service provided over telephone cables.

The last mile also includes the towers that allow people to access the internet with their cell phones. Wireless internet service accounts for a large and growing share of all internet usage.

63
Q

Data centers

A

rooms full of servers that store user data and host online apps and content. Some are owned by large companies such as Google and Facebook. Others are commercial facilities that provide service to many smaller websites. Data centers have very fast internet connections, allowing them to serve many users simultaneously. Data centers can be located anywhere in the world, but they are often located in remote areas where land and electricity are cheap. For example, Google, Facebook, and Microsoft have all constructed vast data centers in Iowa.

64
Q

What is a packet?

A

A packet is the basic unit of information transmitted over the internet. Splitting information up into small, digestible pieces allows the network’s capacity to be used more efficiently.

A packet has two parts. The header contains information that helps the packet get to its destination, including the length of the packet, its source and destination, and a checksum value that helps the recipient detect if a packet was damaged in transit. After the header comes the actual data. A packet can contain up to 64 kilobytes of data, which is roughly 20 pages of plain text.

If internet routers experience congestion or other technical problems, they are allowed to deal with it by simply discarding packets. It’s the sending computer’s responsibility to detect that a packet didn’t reach its destination and send another copy. This approach might seem counterintuitive, but it simplifies the internet’s core infrastructure, leading to higher performance at lower cost.

65
Q

What is SSL?

A

SSL, short for Secure Sockets Layer, is a family of encryption technologies that allows web users to protect the privacy of information they transmit over the internet.

66
Q

Who decides what domain names exist and who gets them?

A

The domain name system is administered by the Internet Corporation for Assigned Names and Numbers (ICANN), a non-profit organization based in California. ICANN was founded in 1998. It was granted authority over DNS by the US Commerce Department, though it has increasingly asserted its independence from the US government.

There are two types of domain names. The first is generic top-level domains (gTLDs) such as .com, .edu, .org, and .gov. Because the internet originated in the United States, these domains tend to be most popular there. Authority over these domains is usually delegated to private organizations.

There are also country-code top-level domains (ccTLDs). Each country in the world has its own 2-letter code. For example, the ccTLD for the United States is .us, Great Britain’s is .uk, and China’s is .cn. These domains are administered by authorities in each country. Some ccTLDs, such as .tv (for the island nation of Tuvalu) and .io (the British Indian Ocean Territory), have become popular for use outside of their home countries.

67
Q

Each browser is made up of 7 different components:

A

User Interface
Browser Engine
Rendering Engine
Networking
JavaScript Interpreter
UI Backend
Data Persistence

68
Q

Browser Engine

A

It is a core component of every web browser. The browser engine functions as an intermediary or a bridge between the user interface and the rendering engine. It queries and handles the rendering engine as per the inputs received from the user interface.

The performance and features of a browser engine can greatly impact the user experience of a web browser. A fast and efficient browser engine can help web pages load quickly and smoothly, while a slower or less capable engine may struggle to render complex pages or provide a smooth browsing experience.

69
Q

Rendering Engine

A

As the name suggests, this component is responsible for rendering a specific web page requested by the user on their screen. It interprets HTML and XML documents along with images that are styled or formatted using CSS, and a final layout is generated, which is displayed on the user interface.

Note: Every browser has its own unique rendering engine. Rendering engines might also differ for different browser versions. The list below mentions browser engines used by a few common browsers:

Google Chrome and Opera v.15+: Blink
Internet Explorer: Trident
Mozilla Firefox: Gecko
Chrome for iOS and Safari: WebKit

70
Q

Networking

A

This component is responsible for managing network calls using standard protocols like HTTP or FTP. It also looks after security issues associated with internet communication.

71
Q

JavaScript Interpreter

A

As the name suggests, it is responsible for parsing and executing the JavaScript code embedded in a website. Once the interpreted results are generated, they are forwarded to the rendering engine for display on the user interface.

72
Q

UI Backend

A

This component uses the user interface methods of the underlying operating system. It is mainly used for drawing basic widgets (windows and combo boxes).

73
Q

Data Storage/ Persistence

A

It is a persistent layer. A web browser needs to store various types of data locally, for example, cookies. As a result, browsers must be compatible with data storage mechanisms such as WebSQL, IndexedDB, FileSystem, etc.

Now that we are aware of the key components involved in building a web browser let’s dig deep into the role of the rendering engine.

74
Q

Basic steps of the rendering engine

A

The requested HTML page is parsed in chunks, including the external CSS files and in style elements, by the rendering engine. The HTML elements are then converted into DOM nodes to form a “content tree” or “DOM tree.”

Simultaneously, the browser also creates a render tree. This tree includes both the styling information as well as the visual instructions that define the order in which the elements will be displayed. The render tree ensures that the content is displayed in the desired order.

Further, the render tree goes through the layout process. When a render tree is created, the position or size values are not assigned. The entire process of calculating values for evaluating the desired position is called a layout process. In this process, every node is assigned the exact coordinates. This ensures that every node appears at an accurate position on the screen.

The final step is to paint the screen, wherein the render tree is traversed, and the renderer’s paint() method is invoked, which paints each node on the screen using the UI backend layer.

75
Q

packet

A

A small unit of data that is transmitted over the internet.