Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by Corion (Pope)
on Oct 12, 2018 at 08:07 UTC ( #1223903=note: print w/replies, xml ) Need Help??


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

The interesting part is not the URL rewriting but the automatic download of the remote URL to a local file.

It wouldn't be hard to try to load both URLs from Javascript, or whatever, but why add additional complexity when you can just rewrite the file?

  • Comment on Re^4: Using a git filter to Cache HTML Resources Locally

Replies are listed 'Best First'.
Re^5: Using a git filter to Cache HTML Resources Locally
by soonix (Abbot) on Oct 12, 2018 at 08:53 UTC

    This remarks reminds me of a caching proxy I had in use when internet connection time was metered in seconds. It might be possible to configure it to the same effect.

    For shielding your "work in progress" from local resources (CSS/JS/...) that are WIP themselves, however, the git filter can do what the proxy definitely can't.
Re^5: Using a git filter to Cache HTML Resources Locally
by Anonymous Monk on Oct 14, 2018 at 07:03 UTC

    The interesting part is not the URL rewriting but the automatic download of the remote URL to a local file.

    Heh

    Downloading/mirroring is the boring part :)(lwp-rget/wget/curl/httrack...)

    The URL rewriting is the eyebrow raising part (sourcefilter)

    It wouldn't be hard to try to load both URLs from Javascript, or whatever, but why add additional complexity when you can just rewrite the file?

    Um, ... Why is one additional complexity but not the other?

      Why is one additional complexity but not the other?

      Rewriting the HTML is optional and local, while using JavaScript is global.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1223903]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2019-06-26 16:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (110 votes). Check out past polls.

    Notices?