[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle replay as alternative to 'Save Page As...' #532

Open
ikreymer opened this issue Nov 13, 2019 · 0 comments
Open

Bundle replay as alternative to 'Save Page As...' #532

ikreymer opened this issue Nov 13, 2019 · 0 comments

Comments

@ikreymer
Copy link
ikreymer commented Nov 13, 2019

It's great to see the initial bundle replay implementation in Chrome 80!

I wanted to suggest an archival use case, from perspective of individual users.
I think web bundles could provide alternative to the existing 'Save Page As...' functionality, which is essentially broken for many modern websites. The idea would be to allow users to 'save' a page as a bundle, and replay the page as best as possible.

The goal would be to make this work without requiring sites having to become more bundle-friendly or require signing.

For bundles to work as a 'generic' save page alternative, I think two extensions would be really useful:

  • Support for non-GET requests, because many sites use other methods during normal operation. I see that this has been closed in Do we need the :method header? #70. Unfortunately, many sites currently use
    POST in normal operation. An example: Twitter uses POST during normal operation. If a user were to save a Tweet, then a critical POST request would be missed, and shows up as an error.

  • Support for custom request/response resolution, perhaps via a 'bundle scoped service worker' that could override fetch() and handle domain-specific requests. Replaying of network traffic is necessarily non-deterministic as often timestamps are added, so a request for https://example.com/?_=123 might be replayed as https://example.com/?_124. If there was a way for a 'worker' in a site to handle fetch(), it could then resolve these in a bundle-specific way.

A bit more background: I've been working on a project called Webrecorder, which allows users to capture network traffic and replay it back (though a server proxy). In a way, it is designed to be as close as possible to a working 'save page as...'. This implementation uses a backend server.

I've also have a service-worker based prototype, https://wab.ac/ which allows replay of HAR, WARC and now bundle WBN files in any browser that supports service workers.
It uses the 'wayback-machine style' URL rewriting approach, but of course it would be better if it could be done 'natively' in the browser, and bundles provide an exciting possibility for that.

I've wondering if there is any interest, perhaps down the road, in expanding bundles to be able to support features needed to 'fix' Save Page As... for users? Or expanding the bundle spec so that extensions could be implemented to facilitate better replay of 'saved' pages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant