What is the difference between TTL and Browser Cache?

Can you answer this question?



Answer
Raghav Kapur
Raghav Kapur
  • Answer written
  • 2 Years ago

TTL is defined as Time to Live. In the case of CDN’s this means it is the time before the CDN server will check for an updated version of the file. So if the TTL for a file is set to 3600 (seconds is the standard unit for this) and you upload a new version of a file after 60 seconds. This new version of the file will not on the CDN till the TTL of the initial file expires.

Most CDN solutions have a way to purge the TTL of a file in case you need to make the new file show instantly.

The Browser cache is set by the max-age parameter. When a user downloads a file, it reads the max-age parameter in the file header to see how long it should cache this file for. This file is stored locally on the users computer, it will not hit the CDN to get the file, till the max-age time expires. So if the max-age is set to 3600 and the file has been updated on the CDN server, it will not show to the user in their browser till the max-age time passes.


Unknown

Related Questions

Popular Products
Amazon CloudFront

Amazon CloudFront

Price : Pay-As-You-Go
Know More >>
CloudFlare

CloudFlare

Price : Free - Custom
Know More >>
StackPath

StackPath

Price : From $10/month
Know More >>

Click here for more products

© analyzo.com