Code Monkey home page Code Monkey logo

Comments (11)

fransallen avatar fransallen commented on May 13, 2024

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.

from statically.

cysabi avatar cysabi commented on May 13, 2024

I just did this, and I'm getting an error saying "Failed to load resource... 404"

from statically.

fransallen avatar fransallen commented on May 13, 2024

Can you confirm is https://cdn.statically.io/gist/LeptoFlare/cd471d7b29902b5d36eb48e64e62d8d1/raw/style.css?dev=1 returned a 404 page for you?

from statically.

cysabi avatar cysabi commented on May 13, 2024

Ah, I added .min. to automatically minify it.

I guess those 2 do not work in conjunction

from statically.

cysabi avatar cysabi commented on May 13, 2024

Can confirm it works properly without .min

from statically.

cysabi avatar cysabi commented on May 13, 2024

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

from statically.

cysabi avatar cysabi commented on May 13, 2024

image
I can confirm at-least that those 2 files ignore the ?dev=1 rule

from statically.

fransallen avatar fransallen commented on May 13, 2024

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.

from statically.

cysabi avatar cysabi commented on May 13, 2024

Those files are not loaded from CDN, they are loaded from locally.
They are a path to another file in the same gist

from statically.

fransallen avatar fransallen commented on May 13, 2024

I mean you have to use something like this:

@import url('style.font.css?dev=1');
@import url('style.a.css?dev=1');

from statically.

cysabi avatar cysabi commented on May 13, 2024

Ah, I see.

Works perfectly! Thank you!

from statically.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.