remy / inliner

Node utility to inline images, CSS and JavaScript for a web page - useful for mobile sites
MIT License
1.1k stars 165 forks source link

use a ServiceWorker + tar. #93

Closed graingert closed 7 years ago

graingert commented 8 years ago

Instead of Base64 encoding URLs you could use the real URL and store the data in a .tar file. Then use a service worker to fulfil the URLs from the tar file.

remy commented 8 years ago

I like the idea of this, but it would have to be opt in. Why the tarball though? Or would that be intended to be untarred in the user's directory?

graingert commented 8 years ago

@remy the files created would be an index.html, and a serviceWorker.js with a tar BaseXML encoded and appended to a tag.

graingert commented 8 years ago

https://github.com/kriswebdev/BaseXML

graingert commented 8 years ago

this allows you to take any number of pages, images and videos and convert them into a two pages

remy commented 8 years ago

I'd be happy to see you take a stab at this. I'd recommend trying to approach it, WRT inliner, as a plugin of sorts that can be enabled via flag.

remy commented 7 years ago

I'm going to close this (given it's almost a year now), but also, I'm not entirely sure it's a common use case.

I'd love to see inliner required into a module that does this, but I don't think it belongs in the code module.

Thanks again for raising the idea.