in reply to Re^4: Using a git filter to Cache HTML Resources Locally
in thread Using a git filter to Cache HTML Resources Locally

Maybe I'm missing something obvious here, but how would you do this for URLs like the ones I showed, e.g. https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css? Remember I said these files are for public distribution, and I can't rely on people having a local server - it's even possible to open the HTML files from the local disk (file://). Using the public CDN URLs is easy, and doesn't require me to distribute a bunch of extra files along with my own.

Huh?

The html files merely detect if a local cache exists, otherwise they load from internet

So a wannabe developer, or clever end user, merely runs  cacheresources.pl and they're set

Replies are listed 'Best First'.
Re^6: Using a git filter to Cache HTML Resources Locally
by haukex (Archbishop) on Oct 14, 2018 at 07:30 UTC

    Sorry, I don't understand what point you're making, and I've already replied on the topic of JS vs. a git filter (twice). Protocol-relative URLs appear to be widely discouraged now, and as I already said, don't seem to help in this case anyway. Could you maybe show some example code of what you mean?

      Protocol-relative URLs appear to be widely discouraged now

      This is news to me. Who is discouraging their use and why?

      Let me try an funnalogy, as I don't see code contributing to understanding when simple english isn't

      me: why not a lightswitch?

      you: what are you crazy, I've already installed electrician to rewire the house on demand

      enjoy