3 ms·
Ask YC: pre-load html pages so they load "instantaneously"?
You can pre-load images that you expect to show on the next page the user sees, so they'll be cached. I'm wondering, would it be practical, if a user is paging through a set of pages by clicking next next next, to preload the next page while the user is watching the current page, so that when they click next it's cached and it appears to load pretty much instantaneously? A text page zipped up is like what, 15, 20kb, so it's not really a traffic hit. And you save the server response time + page generating time, user won't have to wait for that.
Thoughts? Crazy talk?
- tirrellp 16y agoWe did something like this at Yahoo! with an R&D project that never saw the light of day. The functionality was later integrated with Yahoo! toolbar. I think it was called 'Speedboost' or something like that. I'm not a fan of browser toolbars and it was around the time that I left so I don't remember much about how it was being marketed. It took all the visual aspects of Yahoo! properties and 'pushed' them to the IE and FF cache so that when a user visited any number of Yahoo! properties, most of the visuals had already been loaded in the background.
- bwh2 16y agoIf the use case is people clicking next repeatedly, then I think a more practical solution is standard data loading via AJAX. Before building something like this, I would look into its effectiveness in browsers like Firefox that have prefetching enabled by default; at least I think FF still prefetches by default.
- jacquesm 16y agoI tend to really dislike tools like that because they cause a lot of resource consumption based on assumptions that are more often than not wrong. Anticipating users behaviour is quite difficult. What's probably better if you force your users to click 'next, next' is to rethink the way your site is laid out.
- petervandijck 16y agoDisagree. Remember, we're talking about 10k gzipped data. That's like loading 1 extra image, in the background, all for a better user experience. I also disagree because once you experience flipping through photos on FB versus Flickr, you'll see how awesome preloading really can be. It's not just a little faster, there's a different in kind. You use FB photos differently, because it's so fast. It's that difference in kind that I'm shooting for here.
- coryl 16y agoPretty sure facebook photos does this
- petervandijck 16y agoFacebook photos is awesomely fast, it was my inspiration for this.
- Charuru 16y agoIt's not crazy. You should pre-ajax in the content of the next page. Set display:none, when the user clicks next, show it.
- japherwocky 16y agoThis is how jQuery tabs work too. Definitely not crazy.
- ronnoch 16y agoIn Firefox, you can do: <link rel="next" href="page2.html"> Then page2.html will be silently downloaded when the browser is idle, and served from the cache when the user finally clicks the link. It's called prefetching and it only works in FF. More info here: https://developer.mozilla.org/en/link_prefetching_faq https://developer.mozilla.org/en/link_prefetching_faq