Basics Flashcards
Get a fucking job
What is HTTP?
Hypertext Transfer Protocol. Protocol that defines how messages are formatted and transmitted between web browsers and servers. Human readable.
What is HTML?
Hypertext Markup Language. Standard language for creaing web pages. It uses tags to structure content.
How does a GET http message look like?
The GET message which specifies the GET method looks like this:
GET /path/to/resource HTTP/1.1
Host: 127.0.0.1:3000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
In which layer does HTTP works?
Application layer
What does it mean for HTTP to be stateless?
Means that the receiver must not retain a state from previous requests.
In which 3 locations can the cache be?
Browser cache, proxy server, reverse proxy server.
What is stale content?
Cached content that it’s expired.
What is cache validation?
Process of contacting the server to check the validity of cached content.
What is cache invalidation?
The process of removing any stale content in the cache.
How does content get cached?
Whenever a server sends a response message to the client, it sets some headers that are used by the client or any of the intermediate places to cache the content.
Why is the Cache-Control header preferred over others caching headers?
It was introduced with HTTP 1.1 and it is a multivalue header, which means it can return multiple directives of how the caching behavioir should be.
What does “Cache-Control: Private” mean?
It means that the content should only be cached in the client.
What does “Cache-Control: Public” mean?
It means that the content can be stored in proxies.
What does “Cache-Control: no-store” mean?
That the content should never be cached.
What does “Cache-Control: no-cache” mean?
The content can be cached but the client must validate the content using the ETag header.