Professional Documents
Culture Documents
cs201219 Assignmnet 2
cs201219 Assignmnet 2
CS201219
6D
Question 1
The request and response messages are made up of a series of headers and a
body. The headers contain information about the request or response, such as the
type of request, the size of the body, and the caching instructions. The body contains
the actual data being transferred, such as a web page or an image.
HTTP is a very important protocol for the internet. It is used to transfer data for web
pages, images, videos, and other types of content. Without HTTP, the internet would
not be the same.
Question 2
draw and explain web caching cookies and descirbe state of cookies, why
cookies used also explian why web caching used, assumptions and
consequences of web caching
Web caching is a way to store copies of web pages in a local cache so that they can
be served to users more quickly. This can improve performance by reducing the
number of requests that need to be made to the origin server.
Cookies are small text files that are stored on a user's computer by a web server.
They can be used to store information about the user, such as their preferences,
login status, and browsing history. Cookies can be used to improve the user
experience by personalizing the user's experience and remembering their
preferences. They can also be used to track the user's browsing activity and target
them with advertising.
Both web caching and cookies can improve the performance and user experience of
web applications. However, they can also introduce some security and privacy
concerns.
Question 3
There are two main types of DNS queries: iterative and recursive.
● In an iterative query, the client computer sends a DNS query to a DNS server.
The DNS server then checks its own database for the requested information.
If the DNS server does not have the requested information, it will return a
referral to another DNS server. The client computer will then send the DNS
query to the referred DNS server. This process continues until the client
computer finds a DNS server that has the requested information.
● In a recursive query, the client computer sends a DNS query to a DNS server.
The DNS server then recursively searches its own database and the
databases of other DNS servers until it finds the requested information. The
DNS server then returns the requested information to the client computer.
The structure of the DNS is hierarchical. There are three main levels in the DNS
hierarchy:
● Top-level domains (TLDs): The top-level domain is the highest level in the
DNS hierarchy. There are a few hundred TLDs, such as .com, .net, and .org.
● Second-level domains (SLDs): The second-level domain is the second level in
the DNS hierarchy. SLDs are registered by organizations or individuals. For
example, the SLD for Google is "google" and the SLD for Amazon is
"amazon".
● Third-level domains (TLDs): The third-level domain is the third level in the
DNS hierarchy. TLDs are often used to identify specific departments or
divisions within an organization. For example, the TLD for Google's marketing
department is "marketing".
The DNS is a critical part of the internet. It allows users to easily access websites
and other resources by using domain names instead of IP addresses. The DNS is
also used by email servers to deliver email.