-
Notifications
You must be signed in to change notification settings - Fork 6
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
Future of Historical View #1
Comments
You could potentially fetch the html source of each year's page, then pop it into a sandboxed iframe: var base64Source = btoa(unescape(encodeURIComponent(sourceHtml,currentHref,contentType))); But you've probably already tried something like this and it didn't work? |
@trumad Tried it 😄. Too many iframes result in larger memory footprint messing up the tab and not to forget, scroll jank. Also, It's a bit like watching living, breathing creatures clamoring to get out of those mini cages. |
lol, I've never thought of it that way. Those poor creatues... Could you make an iframe and then immediately screenshot it in the user's browser, then replace the iframe with a screenshot? I'm not sure how possible that is. I know it's easy to use canvas to get a screenshot, but I don't know about a whole iframe. Just spitballing, hope you don't mind! |
Of course not.
It would be too many dom construction and destruction for a simple use-case, will probably mess up the framerate, making it unusable for the user. Also, for screenshots, html2canvas would have to be injected in to those frames somehow but if I recall correctly, it gives out inconsistent screenshots. Some styles are never captured. so, html2canvas is out. Another option: https://developer.chrome.com/docs/extensions/reference/tabs/#method-captureVisibleTab Another option: https://blog.stackblitz.com/posts/introducing-webcontainers/. Run node on the browser and invoke puppeteer with in the browser to take a screenshot 🤯. That would be fun 😂. |
Yeah, it sounds like html2canvas would be too janky, and opening & closing new tabs would be even worse. You've clearly given this a lot of thought.
That's the dumbest thing I ever heard. You should do it! |
Historical view displays a single snapshot of a webpage for each year that it's been archived for. It uses Puppeteer to capture screenshots which in turn runs on AWS Lambda as a serverless function. Screenshots are not free. For now, the service is running on AWS Free Tier and is free for 1M free requests per month until September this year. So, it likely will only last until then.
Also, It's just not a good user experience, as it's been throttled to around 5 seconds for each snapshot to reduce load on Archive servers. Hopefully Wayback could support something like this in the future.
The text was updated successfully, but these errors were encountered: