0% found this document useful (0 votes)
3 views6 pages

NGINX HTTP Cache Control Explained

Uploaded by

nithints435
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

NGINX HTTP Cache Control Explained

Uploaded by

nithints435
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

NGINX: HTTP Cache Control Headers

NGINX : Web-Server & Load Balancer

../[Link]
NGINX : Web-Server & Load Balancer
➤ Cache Control Headers -
➤ A Cache-control is an HTTP header used to specify browser
caching policies in both client requests and server responses.
➤ Policies include how a resource is cached, where it’s cached
and its maximum age before expiring.
NGINX : Web-Server & Load Balancer
➤ Cache-Control: Max-Age
➤ The max-age request directive defines, in seconds, the amount
of time it takes for a cached copy of a resource to expire. After
expiring, a browser must refresh its version of the resource by
sending another request to a server.
➤ For example, cache-control: max-age=120 means that the
returned resource is valid for 120 seconds, after which the
browser has to request a newer version.
➤ Cache-Control: No-Cache
➤ The no-cache directive means that a browser may cache a
response, but must first submit a validation request to
an origin server.
NGINX : Web-Server & Load Balancer
➤ Cache-Control: No-Store
➤ The no-store directive means browsers aren’t allowed to
cache a response and must pull it from the server each time
it’s requested. This setting is usually used for sensitive data,
such as personal banking details.
➤ Cache-Control: Public
➤ The public response directive indicates that a resource can be
cached by any cache.
➤ Cache-Control: Private
➤ The private response directive indicates that a resource is user
specific—it can still be cached, but only on a client device.
Will see you in Next Lecture…

See you in next lecture …

You might also like