How to setup different TTLs for HTML and Static Resources
-
Hi,
I am new to this plugin.
I want to have a very short TTL for the HTML, saying 60s, and a much longer TTL for static contents like JS or CSS.
This plugin is the only one I use regarding caching, and below is my situation:
1. If I choose “Respect Existing Headers” in Cloudflare, there will be no cache-control for my static contents. But the HTML can have: “cache-control: s-maxage=31536000, max-age=60”.
2. If I specify a browser TTL in Cloudflare, saying 30 minutes, both of the HTML and the static resources will have “cache-control: max-age=1800, s-maxage=31536000”.
What I want to achieve is to have:
“cache-control: s-maxage=31536000, max-age=60”. for HTML, and
“cache-control: max-age=1800, s-maxage=31536000” for JS/CSS/font etc.Any idea about how to do that?
The page I need help with: [log in to see the link]
- The topic ‘How to setup different TTLs for HTML and Static Resources’ is closed to new replies.