How to Grab Webpage images Faster
|
Jul. 22, 2004, 11:59 AM
Post: #1
|
|||
|
|||
Hi !
I am keen to know if there are any filters available for downloading standard images faster. Is there a way to give higher priority through filters to grab the images first and then the rest of the pages? Thanks Garcot |
|||
Jul. 22, 2004, 12:31 PM
Post: #2
|
|||
|
|||
I think it's part of the browser's rendering logic to get the page layout first, so that it knows where to position the images.
That would mean it's not possible. (I removed the duped topic.) sidki |
|||
Jul. 23, 2004, 12:36 AM
Post: #3
|
|||
|
|||
garcot;
To expand on what sidki said..... Ummm, why would you want an image to load before anything else? Could it be that you think the whole page will be displayed more quickly? Hardly. Consider this: Your browser can't go get a resource from the web until it's told to do so, doesn't that make sense? So, unless your browser can read minds, then it can't get an image before any text arrives telling it what to do. That's what sidki meant by "it's not possible". And to whet your appetite (or maybe to fan the flames), yes you could conceivably write a filter to do just what you want. Here's how to do it: - Store all text in a number of variables. - Comb each variable for a resource, be it an image, an audio file, a Flash file, whatever. - Pass to the browser the command to fetch that resource from the web. - Wait for the resource request to be fulfilled before passing another command to the browser. - Repeat until all resources have been fetched. But wait, what happens when a single resource shows up? Doesn't the browser just render or display it right away? Yep, sure does. No context has yet been given to the browser for the ultimate display, so just the bare image is displayed in the upper left corner. So now you have a bunch of images (or whatever) parading down the left side of the screen. Can you now issue the rest of the formatting commands? Yes, you can, but what will be the effect? Will the screen go into a tizzy, re-arranging itself multiple times to display each resource? Probably. At best, in fact. At worst, it will ignore that which has already been processed (as "a duplicate" request), and simply give you a patchwork of crap. I don't wanna be the CTD for this one. (ProxRocks - that means Crash Test Dummy!) In summary, sidki is right - effectively, it's not possible to re-arrange the order in which resources are fetched from the 'Net. But if you do try the above method, please write to us from the booby-hatch, and tell us how much delay your filter introduced to your surfing experience. That's providing that you didn't go to jail for murder and mayhem after you went crazy while waiting for a page to finish loading. <_< [lol] Do you still want to do this? :o [unsure] Oddysey I'm no longer in the rat race - the rats won't have me! |
|||
Jul. 23, 2004, 12:49 AM
Post: #4
|
|||
|
|||
Try this filter to prefetch images. i got it somewhere here, can't remember.
Name = "Prefetch all images" Active = TRUE Limit = 256 Match = "<end>" Replace = "\n" "<script language="JavaScript">\n" "// Prefetch all images\n" "var prxLinks = document.links;\n" "var prxCachedLinks = new Array(prxLinks.length);\n" "" "var jpgExt = ".jpg";\n" "var gifExt = ".gif";\n" "var pngExt = ".png";\n" "var jpegExt = ".jpeg";\n" "var prxURL;\n" "var matchIndex;\n" "for (i=0; i<prxLinks.length; i++)\n" "{\n" " prxURL = prxLinks[i].href;\n" " matchIndex = prxURL.length-4;\n" " if ((prxURL.toLowerCase().lastIndexOf(jpgExt)==matchIndex) ||\n" " (prxURL.toLowerCase().lastIndexOf(gifExt)==matchIndex) ||\n" " (prxURL.toLowerCase().lastIndexOf(pngExt)==matchIndex) ||\n" " (prxURL.toLowerCase().lastIndexOf(jpegExt)==matchIndex))\n" " {\n" " prxCachedLinks[i] = new Image();\n" " prxCachedLinks[i].src = prxLinks[i];\n" " //DEBUG\n" " //document.write(prxLinks[i]+"<br>");\n" " }; // if\n" "}; // for\n" "</script>\n" |
|||
Jul. 23, 2004, 01:07 AM
Post: #5
|
|||
|
|||
elshaddai;
Hmmm, lessee here: we look for the <end> of a page, and then we append a script after that, said script doing nothing more than what's already being done by the resource fetching engine, as instructed by the HTML code prior to.... the <end> of the page. Yep, prefetching what's already being fetched makes sense to me. <span style='color:red'>Not.</span> Didn't we hash this out once before, or was that over on Arne's forum? I'm not gonna go look, not now - I'm in the middle of a Rothschilds! <_< Sorry, elshaddai, I'm just havin' fun, that's all. Nuttin' personal, you understand. Garcot is new here, you're not - that makes you fair game! :o Oddysey I'm no longer in the rat race - the rats won't have me! |
|||
Jul. 23, 2004, 03:01 AM
Post: #6
|
|||
|
|||
elshaddai,
Thanks for your Filter. But it is not making the fresh images load faster. Infact, it is interfering with the grabbing the HOSTS. It also is, delaying the DNS Lookup of WinXP DNS client. Yes, for prefetching the downloaded images, it works faster. Thanks again for all who helped me understand the basic logic. Regards Garcot |
|||
Jul. 25, 2004, 10:28 PM
Post: #7
|
|||
|
|||
Garcot
I use this filter on pages with thumbnails. I find that it speeds up the loading of the bigger or original image while you're opening them up individually. Oddysey, I am game for anything esp. a Rothschild, however I prefer to head South, like Chile and Australia. |
|||
Oct. 03, 2004, 07:57 PM
Post: #8
|
|||
|
|||
elshaddai;
I've decided to resurrect this thread for reasons that should become obvious in a moment. First, this topic has been initiated, and I've referenced this thread therein. Second, I realize now that I never responded to your final message about prefetching images from thumbnails. Quote:I use this filter on pages with thumbnails. I find that it speeds up the loading of the bigger or original image while you're opening them up individually.That would definitely be a good reason for instituting such a filter! Third, I'd like to make a suggestion for an improvment to this filter. Why not just write a text file, name it "pfi.js" (pre-fetch images), and write the filter to include it? That way, the filter isn't spending nearly as much time writing each individual line, it merely tells the browser to incorporate the .js file, and let's the browser do the dirty work. Here's what I'm thinking: Code: Name = "Prefetch full size images" Now you write the javascript code as a file, which will be included via the path/filename in the above filter. Code: var prxLinks = document.links; Oddysey I'm no longer in the rat race - the rats won't have me! |
|||
Oct. 06, 2004, 07:27 PM
Post: #9
|
|||
|
|||
I don't now what you quite want, but if it's a website that you visit regularly and you just want some certain images to load instantly because they take so loonnnnnngggggggg. Then wait for it to load, save the images to proxo dir, then make a web page filter to find the path of the image and replace with your hard-drive image.....gauranteed 1 second load
Sorry if this confused you, but im sure one of you proxo guru's out there could make something of this....i would do it myself but im tooooo tired -_- (?`?._)?n?iT?u??(?`?._) |
|||
« Next Oldest | Next Newest »
|