using prefetching to speed slideshow/browsing dramatically
dmd
Joined: 2003-06-28
Posts: 50 |
Posted: Sun, 2005-04-03 03:55 |
It seems to me that use of Mozilla/Firefox's prefetching capability (http://www.mozilla.org/projects/netlib/Link_Prefetching_FAQ.html) would make slideshows dramatically better looking, and make paging through albums much, much faster as well. Has anyone looked into implementing this? I'd be happy to (it seems easy enough), but if others have thought about it deeply and rejected it already, I'd like to hear about it first. (It seems so obvious and trivial and dramatically a good thing, it puzzles me why it hasn't already been done.) |
|
Posts: 50
Ok, I feel dumb now - gallery already does this!
But... why isn't Firefox paying any attention to it? I'm watching in Ethereal, and it's quite clearly not doing it.
Posts: 50
Ok, I see why now - it's prefetching the HTML, but not the image.
It would be nice if it would prefetch the image, too. Gallery code is scaring me - I can't seem to figure out how to do this. Could someone who's familar with it tell me how to add a prefetch line that'll load the next and previous page's photos?
Basically - in the context of view_photo.php, how can I determine the full and thumb versions of the next and previous images?
I see that makeAlbumUrl($gallery->session->albumName, $navigator['allIds'][$navpage-1]) and makeAlbumUrl($gallery->session->albumName, $navigator['allIds'][$navpage+1]) will give me the previous and next pages, but I want the previous and next photos.
Posts: 27300
So you are saying the in for example my test view_photo.php page has this as the source
and it only prefetches the HTML? There was a post about this code incrementing the image count. You are saying it does not get the image as well?
So you are saying that it should prefetch the image as well like
<link rel="next" href="http://langleycom.com/g1/albums/album13/DCP_1826.sized.jpg" >
in addition to the prefetching the HTML?Dave
Posts: 50
Correct. Can't hurt, and if the user indeed goes to the next/prev page as expected, it would make gallery amazingly responsive.
Posts: 50
So, is this a lot harder than I thought?
Posts: 50
I'm sure I'm forgetting a thousand special cases, but this seems to work pretty well for me!
Posts: 3236
I don't spose there is a chance you could run that as a "diff -u" instead? I just find it easier to read
Posts: 50
Posts: 50
Any chance this could get incorporated into G1? It makes my site ( http://wurble.net/gallery/ ) appear way faster than any other I've ever seen, and that's only a good thing for people's perception of Gallery...
Posts: 27300
dmd... the best way for things to get into the next version is to post your diff in http://sourceforge.net/tracker/?group_id=7130&atid=307130 and make your case.
Then you can Vote on it as well http://gallery.menalto.com/sfvote_help
Dave
Gallery Frames / Mods || G1 Test Gallery