Closed cysabi closed 4 years ago
Hi @LeptoFlare, CDN will cache Gist for 1 day. If you wish for some more shorter Cache-Control
you can use ?dev=1
after the URL, it will give you a CDN cache for only 5 minutes.
I hope this helps.
I just did this, and I'm getting an error saying "Failed to load resource... 404"
Can you confirm is https://cdn.statically.io/gist/LeptoFlare/cd471d7b29902b5d36eb48e64e62d8d1/raw/style.css?dev=1 returned a 404 page for you?
Ah, I added .min.
to automatically minify it.
I guess those 2 do not work in conjunction
Can confirm it works properly without .min
However, if you see my style.css
I have
@import url('style.font.css');
@import url('style.a.css');
It seems these files still seemed to be cached from more than 24 hours ago
I can confirm at-least that those 2 files ignore the ?dev=1
rule
Yes, .min
only for production needs.
To get a shorter CDN cache, you also need to set dev=1
to other files, because they are different requests.
Those files are not loaded from CDN, they are loaded from locally. They are a path to another file in the same gist
I mean you have to use something like this:
@import url('style.font.css?dev=1');
@import url('style.a.css?dev=1');
Ah, I see.
Works perfectly! Thank you!
The original Github Gist link:
The
statically.io
link: