---
title: Setting Cache-Control Headers
description: Learn how to set up Cache-Control headers for best use in our Headless Platform
url: https://developers.wpengine.com/docs/headless-platform/additional-guides/cache-control/
image: https://developers.wpengine.com/og/docs/headless-platform/additional-guides/cache-control.png
---

# Setting Cache-Control Headers

Through HTTP, `Cache-Control` gives your frontend applications instructions for caching requests and responses to your app. Optimizing Cache-Control for our Headless Platform will help with the deliverability of your content between the frontend and WordPress backends. To determine how to set up Cache-Control, see the MDN Web documentation for [Cache-Control](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control).

## Apps Without Cache-Control

When you choose not to use Cache-Control, our Headless Platform attempts to guess how to cache content based on the [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types). Static resources, such as CSS, Javascript, JSON, images, and videos, cache usually for 10 seconds.

## Next.js Apps

Frontend applications using Next.js add immutable Cache-Control header resources, with `max-age` being when a resource remains in the cache in seconds. For example, any resources found in `/_next/static/` stay cached for `max-age=31536000,immutable`. Other static resources such as `/public/images/` stay cached for `max-age=0`.

For any custom resources you want to cache, add your custom headers outside of `/_next/static/`. For instructions, refer to the Next.js’ [headers documentation](https://nextjs.org/docs/api-reference/next.config.js/headers).

## Was this helpful?

Thanks for the feedback!

```json
{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://developers.wpengine.com/#website","name":"WP Engine Product Documentation","url":"https://developers.wpengine.com/","description":"Resources for developing, deploying, and scaling on WP Engine.","inLanguage":"en-US","keywords":["API documentation","product documentation","headless WordPress","managed WordPress hosting"],"publisher":{"@id":"https://wpengine.com/#organization"}}]}
```
