10 ms·
What I want implemented.. Chrome/Firefox whatever... is that instead of unloading and reloading when I go back to the tab I want it to export basically an HTML
by swang 5y ago
What I want implemented.. Chrome/Firefox whatever... is that instead of unloading and reloading when I go back to the tab I want it to export basically an HTML file and when I click back to that tab, I want it to reload the HTML file instead with some notification/marker that it is a "cached" version. There are times where I'll leave a tab in the background that I don't want refreshed but when it gets unloaded, poof, I lose the original data from that page.
I know about Chrome and its ability to prevent discards, but I want this to be the default or at least a toggle option. I don't mind the unloading of the tab, I just get annoyed when it reloads.
- hoten 5y agoIt'd have to be more than just the HTML, it'd need to be everything the page used. Basically, all the data you'd get by clicking the "download HAR" button in the DevTools Network panel. Including some special sauce on top to replay any XHRs (assuming you want to get to the last state by replaying... otherwise the JS page state would need to serialized some how)
- jandrese 5y agoCouldn't the browser just dump the current DOM and JS state onto a disk? Treat it like a computer hibernating.
- ct0 5y agoThis is my pet peeve. Most of the time I notice this when im interested in a reddit thread that's deleted and I lose the ability to review it.
- lucb1e 5y agoThis, plus any sort of live data (think stock market, tweet feed, etc.), plus any sort of form input (input fields should survive since like Firefox 3.5, but then people discovered you could also dynamically build forms with Javascript and the rest is history).
- capitainenemo 5y agoI know this doesn't help with the cache part, but if you pin a tab, it used to prevent it from getting unloaded. Might help if a particular tab is important to you and they still honour that.
- SilasX 5y agoThis! I feel like Back used to get instant results all the time, and now it's almost always a big delay, which is a huge pain -- plus, it loses your position on infiniscroll and other dark patterns. Part of it is caused by site coding, but part of it is browsers treating "back" as some species of new page load/arrival/selection. And I know it's possible to get us back to the old days! The functionality I want is almost exactly what I would (already) get if I just opened every link in a new tab and switched back instead of triggering the back button. (Which, incidentally, is what many sites recommend doing now for that very reason -- at least reddit.)
- NoGravitas 5y agoBack basically works like it always did on static sites. Blame the fashion for single-page apps and endless scrolling for it being broken.
- deleted 5y ago[deleted]
- dorgo 5y agoNo. Blame browsers for not being user-agents any more. Browsers can cache websites, but only if websites tell them to do so. Users are never asked ( there is no setting ). And since websites usually don't want to be cached (for too long) browsers have to reload them ( which takes time ). Thats the reason Back-buttons are slow. Thats ( one of ) the reason(s) everybody has 100+ tabs open. SPAs and infinite scroll are (maybe) bad, but not the cause of this problem.
- iggldiggl 5y agoSome infinite scroll-type pages consume ridiculous amounts of memory the further you scroll (and if the page disallows direct navigation to a point in history and you need to find something older that you didn't save a direct link for, you've got no choice but to scroll, and scroll, and scroll…), so limitless caching isn't quite the right answer, either…
- 5y ago
- sails 5y agoWould love to know if this is practically possible. I use Auto tab discard [] to save memory, but I'd much prefer the ability to retrieve an html file than having to reload the page. A simple way to save that html file of current view when bookmarking a page would also be a useful addition in a similar vein. [] https://addons.mozilla.org/en-GB/firefox/addon/auto-tab-discard/ https://addons.mozilla.org/en-GB/firefox/addon/auto-tab-disc...
- graindcafe 5y agoDoesn't OS swap covers much of your need ?
- bmicraft 5y agoNot when the need is to increase battery life (reduce cpu usage). Having a couple of youtube/reddit tabs open in the background can really impact battery life I've found.
- mdoms 5y agoThis is precisely what Edge does on Android, not sure if it's the same behaviour in Chrome on Android.
- karlding 5y agoChromium has "Paint Preview" (aka "Freeze-Dried Tabs") [0] which does something similar. Basically it consists of a capture (Skia Picture and links in a proto), compositing the capture into bitmap tiles, and then playback to play the page using the native UI. I think it's only supported on Chrome for Android right now. [0] https://chromium.googlesource.com/chromium/src/+/refs/heads/main/components/paint_preview https://chromium.googlesource.com/chromium/src/+/refs/heads/...
- okasaki 5y agoOne way to fix this is to buy more memory (if possible). Then your tabs will be much less likely to be unloaded.
- kitsunesoba 5y agoI can’t speak for Gecko or Blink/Chromium, but I don’t think this would be difficult to implement in a WebKit browser as long as some limits are involved. Just save the tab’s contents in a webarchive file, then when restoring load that webarchive and inject some JavaScript that makes any kind of interaction aside from scrolling load the page’s live counterpart (with a confirmation prompt, perhaps). This would also come with the advantage of the cached version showing up in browser history for “free”, so if you inadvertently go to the live page undoing it is as easy as hitting the back button, and if you decide you want to preserve the cached state indefinitely all the browser has to do is copy the webarchive file out of temporary storage to wherever the user indicates.
- freediver 5y agoCan you contact me? Would like to explore implementing this idea in Orion with you.
- bogidon 5y agoI was surprised recently to learn about the back/forward cache (bfcache) [1], a common browser optimization that sort of does what you're describing but stores a more complete snapshot of the page, including the JS heap. I'm not sure if it's used in this new FF feature (the article doesn't give details about the mechanism of unloading). However the bfcache unsurprisingly causes edge cases in JS-heavy pages/SPAs, and a prevailing solution [2] is for the page to force a reload when it is restored from this cache rather than explicitly handling those edge cases, nullifying the optimization. [1] https://web.dev/bfcache/ https://web.dev/bfcache/ [2] https://stackoverflow.com/a/13123626/14665201 https://stackoverflow.com/a/13123626/14665201
- Arcsech 5y agoYet another instance of SPAs pointlessly reinventing problems we solved decades ago.
- DangitBobby 5y agoCan you seriously not think of a single use case for SPAs?
- eloisius 5y agoAside from cost-savings for the business I can’t really think of one.
- jklinger410 5y agoYeah it would be cool if it saved the state of the page until you manually refreshed it.
- remram 5y agoMy number one annoyance (with Firefox and Auto-Discard extension) is when I open back my tab and get a redirection to some login page. Login, get sent to homepage. Back button sends me to login page. No way to get back to the actual tab I'd left there... That tab is then lost forever, unless I can find it in the history from whenever I had opened the tab.
- progval 5y agoLong-click the back button to get a list of previous pages in the tab.
- Avery3R 5y agoRight click for people with real mice
- still_grokking 5y agoI have a real mouse. I didn't know that until yet! The long click has still the advantage that you don't need to click more than once: You can just hold the button, mouse-over the wanted entry, and than release the button triggering navigation to the history entry currently under the cursor.
- deleted 5y ago[deleted]
- smichel17 5y agoYou can do the same thing with right click :)
- remram 5y agoIt's not there. It's like the redirect replaces the history entry.
- jodrellblank 5y agoTwo web apps I use every day at work have this behaviour when I look away and my session times out. Both of them break web expectations by having the same generic URL for every page. I leave half a dozen tabs open, come back later or the next day and if I'm not careful to login again in a new tab before I refresh them, they're lost. It's the kind of thing which makes me convinced the developers never use their own system, never sit with real users, and think a lot less of the vendor even though I have no power to influence the decision to renew them or not.
- gildas 5y agoSingleFile [1] is supposed to be able to do that (more or less) by enabling these settings in the options page: - User Interface > open saved page in a new tab - User Interface > auto-close the tab after the page is saved - Auto-save > auto-save on tab discard Then you have to select in the context menu of the extension: Auto-save > Auto-save all tabs (or Auto-save unpinned tabs) [1] https://github.com/gildas-lormeau/SingleFile https://github.com/gildas-lormeau/SingleFile
- spython 5y agoSounds like you want WebMemex, specifically the freeze-dry functionality: https://github.com/WebMemex https://github.com/WebMemex
- twistedpair 5y agoI think this gets to the root of why you're leaving a tab open. You might have non-persisted state in the page, hence you don't want to close it.
- dredmorbius 5y agoNon-persistent state in a page, or in the tab context itself --- how did I get here, what was I doing, what's the history for this particular session, what other tabs do I have open around this, etc. None of the usual suspects generally suggested as alternatives to leaving tabs open really addresses any of this. For all the research into browsers and their use, the concept of user state and workflow is utterly ignored.
- swiley 5y agoThis is what I'm planning for my browser; the web engine will serialize a continuation of sorts that you can load into new instances and mutate in eg cli tools or another computer. Still chugging through basic features like js for now though.
- alfiedotwtf 5y agoUnless I'm missing something, I want a "Save DOM as file"
- Zardoz84 5y agoFirefox dont loses state or information when unloads a tab.
- iggldiggl 5y agoOf course it does. It tries saving the current scroll position and form data that might be present, and a few other bits of information, but for any even-just moderately complex JS-powered page this can easily break down unless the page in question has been properly coded to save and restore its state across a tab closing and re-opening (and a lot of pages haven't been properly coded in that regard). Just try using any infinite scroll-type page – unless the pages saves the scroll position itself (to name one popular page, Instagram doesn't for example), all your scroll progress is lost once the tab is unloaded.