1
votes

I just run my phoenix app/website through both Google Page Speed Insights and GTMetrix.com

They're both recommending to "Add Expiry Headers" to the Static Assets:

YSlow Performance Check

More specifically: to add a "far-future expiration date".

I looked through the Plug Documentation, and it seems to me that it was supposed to be working as is. I tried dabbling with the gzip :true option just for the sake of it.

Apparently ($ curl -vI https://liberty.ai/images/[email protected]) the Max-Age is set to four hours (14400/60*60), is there any way to change it?

< Cache-Control: public, max-age=14400
Cache-Control: public, max-age=14400
< Strict-Transport-Security: max-age=31536000
Strict-Transport-Security: max-age=31536000
< Etag: E640E7
Etag: E640E7
1
I'm seeing Cache-Control: public, max-age=31536000 here on that URL.Dogbert
You're right, I had just fixed it. It was a setting in CloudFlare's dashboard... Sorry about that.Jonathan Soifer

1 Answers

1
votes

Turns out that CloudFlare's Caching options completely override the apps settings.

I was experimenting with those configurations when I made it work just by "switching" the default caching of 4 hours to whatever I wanted.

I'll let this be here in case anyone else faces the same issue...