LogoLogo
  • Welcome
  • Landing in Transparent Edge
  • Sign up process
  • Getting Started
    • Basics concepts
      • Glosary
        • API
        • Brotli Compression
        • Cache-Control
        • Cache key
        • Caching
        • CNAME
        • Cloud Computing
        • Cloud Computing Architecture
        • Cloud Services
        • DASH
        • Data Center
        • Edge Server
        • ETag
        • GSLB
        • HLS (HTTP Live Streaming)
        • HTTP/2
        • Infrastructure as a Service (IaaS)
        • Internet Exchange Point
        • Last-Modified
        • Load Balancing
        • MultiCDN
        • NoSQL (not only SQL)
        • Origin
        • Origin Shield
        • OTT (Over The Top)
        • Platform as a Service (PaaS)
        • PoP (Point of Presence)
        • Private CDN
        • Private Cloud
        • Public Cloud
        • Purge
        • Query String
        • Reverse Proxy
        • RTT (Round-trip Time)
        • SaaS (Software as a Service)
        • SDS (Software Defined Storage)
        • Smooth Streaming
        • Status Code
        • TCP (Transmission Control Protocol)
        • TLS Acceleration
        • TLS (Transport Layer Security)
        • TTFB (Time-to-first-byte)
        • TTL (Time-to-live)
        • Virtual Machine
        • VPS (Virtual Private Server)
        • Web Services
      • Let's start at the beginning
      • Things to consider
      • Houston, we have a problem
      • HTTP, How does it work?
      • Invalidating methods
      • DNS Pointing
      • Log formats
      • Predefined headers
      • Default headers
        • geo_country_code
        • X-Device
        • Vary
        • Cache headers
        • Age
        • TP-Cache
        • True-Client-IP and X-Forwarded-For
      • Forcing No-Cache
      • Architecture
        • Transparent Edge’s IP addresses
        • Locations and PoP
        • Cache layers
      • Cache effectiveness
      • SSL
      • HTTP 5xx Error Codes
      • Features
        • Protection against origin failures
        • Rate Limit
        • Geolocation and geoblocking
        • Prefechting
        • Refetching
        • Fast purging
        • HTTP Redirects
        • Caching static vs. dynamic objects
        • Rewriting of headers
        • Device detection
    • Dashboard
      • Historic
      • Analytics
      • Invalidating content
      • Content invalidation by tags
      • Prefetching Cache
      • Log shipping
      • Provisioning
        • Initial configuration
        • Backends
        • Sites
        • Configuration deployments
        • Network ACLs
        • TLS/SSL Certificates
      • User management
  • Configuration
    • VCL Reference
      • Default Functions
      • VCL Objects
      • Callable Functions
      • Security restrictions
      • Varnish book
    • Network Access Control List
      • Initial configuration
      • Auto generated lists
      • Manage lists via API
    • i3
      • Quality adjustment
      • Cache timing allocation for transformed images
      • Conversion to grayscale
      • Conversion to WebP
      • Blurring
      • Inclusion of graphics in the footer (strip)
      • Automatic resizing
      • Definition of the maximum size (content-length)
    • Transcoding
      • Relaunch or requeue jobs
      • Create a transcode job
      • Get job information
      • Dashboard usage
    • OpenAPI de TransparentCDN
  • Security
    • HTTPS
    • Blocking User-Agent
    • Blocking by IP Address
    • Blocking Requests Geographically
    • Avoiding Hotlinking
    • Bot Mitigation
    • WAF
      • Configuration
      • CAPTCHA
      • Content protected by token
      • Rate limit
    • Anomaly Detection
      • Detection Types
      • Automatic Reactions
      • Detection History
    • Under attack mode
    • Global Whitelists
  • Integrations
    • Wordpress plugin
    • Google Cloud Platform
    • Amazon Web Services
  • GUIDES AND TUTORIALS
    • How to do things
    • Edge Computing
      • ESI Tags
    • Acting on the Query String
    • Working with cookies
    • Making decisions based on HTTP headers
    • Web Application Gateway
    • Configure your servers to send cache headers
    • Caching a version per device
    • True-Client-IP in the origin
    • A/B Testing
    • Routing traffic to different backends
    • JSON Web Tokens
    • Debug codes
    • Streaming logs
    • API
      • Authentication
      • Invalidation
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Getting Started
  2. Basics concepts
  3. Default headers

Cache headers

Cache headers are key to the correct functioning of a cache system in general, and of Transparent Edge in particular. Using them significantly increases the load speed of web pages, improving the user experience.

Transparent Edge uses several types of headers to know whether or not to store an object in its cache, but in this document, we're going to focus on the Cache-Control header.

At Transparent Edge, the Cache-Control header takes preference over all other cache headers—so if there are more than one, it’s the only one we’ll pay heed to.

The Cache-Control header is an improvement in HTTP/1.1 which simplifies the previous caching mechanisms in the HTTP/1.0 protocol. We use this header to indicate to intermediate caches and the browser cache whether or not an object should be stored and for how much time.

Like all HTTP headers, Cache-Control is a key-value pair, where the key is always the word Cache-Control. In terms of the server’s response, this value can be:

public

The Public header indicates to the cache that the object is public and therefore cacheable. It’s not typically found alone in the Cache-Control header.

private

Unlike Public, the Private header indicates that the content should not be cached because it is user-personalized content and should only be stored on the client's local device.

no-cache

The No-Cache header prevents an object from being cached in Transparent Edge. Even if the object is stored, it is never used.

no-store

This option prevents the cache from storing—and therefore caching—the object.

The Private, No-Cache, and No-Store headers all have the same effect on browsing (with slight differences): They force the content to be cached on the client’s origin servers.

must-revalidate

This option forces the cache to go to the origin for a new copy of the object, telling it to disregard the rest of the cache headers and go get a new copy.

proxy-revalidate

This works just like Must-Revalidate but only affects proxies.

max-age

This header is used to indicate to Transparent Edge how many seconds we want the object to be stored in the cache and marked as valid. Once this time has passed, the object is marked as expired and the system is forced to go to the client’s origin servers for a new copy. This option affects both proxies and browser caches.

s-maxage

This is exactly the same as Max-Age, except it only affects the behavior of proxies and not browser caches. The two can be used in conjunction to create special behaviors, for example:

Cache-Control: max-age=0, s-maxage=3600

In this special case, the object will be stored on Transparent Edge for one hour (3600 s), but it won’t be stored in the browser.

PreviousVaryNextAge

Last updated 2 years ago

Was this helpful?