r1 - 02 Jan 2005 - 02:02:00 - DanielBeardsmoreYou are here: TWiki >  ICab Web > UnofficialFAQ > Prefetch

Overview

When Prefetch is enabled and you open pages in iCab, iCab will also load all the pages that they link to; this means that when you follow a link on a page, it will load immediately because the page has already been fetched by iCab and stored in the Web cache.

Of course, this means that a lot of extra pages are going to be downloaded, very often ones that you don't even want to read. Whether or not Prefetch works well for you will depend on your connection speed and browsing habits. It is recommended that you experiment with it; use it if you like it, and leave it off if you don't.

Usage notes

Activating Prefetch

Prefetch is activated from the File menu: File > Prefetch. Prefetch is automatically turned off each time you enter Kiosk mode or Offline mode, and is not restored afterwards. iCab will also not keep it enabled when you quit and reload iCab, it must be renabled each time you start iCab if you want to keep using it.

Safety and peace of mind

In practice, Prefetch will not in fact download all linked pages, or even that many at all I suspect, although this will depend on the sorts of sites you visit. Because many sites bear URLs that carry out actions when opened (e.g. "/logout.php", "/shop.asp?action=buyItNow&product=SomethingReallyExpensive"), iCab will only open a small subset of page URLs that are deemed to be safe from side-effects:

  • URLs that end in / (generally, these are plain pages)
  • URLs that end in .htm or .html (regular, plain Web pages)

This way, using Prefetch should never log you straight back out of a site or do anything else unwanted, e.g. wantonly purchase items and delete stuff all over the place. All sites that use PHP (.php), ASP (.asp), SSI (.shtml), Java (.jsp) and similar technologies will not have most of their pages prefetched (except URLs that end in /). Likewise, any link with a URL with query arguments (that ends in ...?some-stuff) will also be ignored.

According to the iCab 2.4 documentation:

If web designers would respect the HTML specification, there would be no problem at all, because actions with side effects (like logging out or buying something) would be always triggered with the HTTP POST command, as recommended by the HTML specification (and POST is always ignored by the 'Prefetch' feature). Unfortunately this is not always done so you should be careful where to enable the 'Prefetch' feature. So you should not use the 'Prefetch' feature on sites where you can buy something without confirmation (like the One-Click-Buy feature of Amazon) or similar things.

With the new restrictions iCab doesn't pre-load most 'log out' links anymore and even Amazon's One-Click-Buy feature is ignored by iCab (with the current site layout of Amazon). But nevertheless use the 'Prefetch' feature with care.

Sadly, a large number of sites use server-side scripting (.asp, .php etc) (and for good reason, it's wonderful!); when I went to write this topic, I had a play with Prefetch and wondered why it wasn't doing anything. Until I realised that all the pages I was viewing had links that used URL arguments (...?some-stuff). So, do expect a lot of sites to not work with Prefetch. But then, for me, it does not appear to do anything at all. Might just be that iCab 3 beta doesn't seem to work in 9 to begin with?

Troubleshooting

Prefetch requires that you have the Web cache enabled (i.e. a setting of 1 MB or more for the cache), because this is where Prefetch stores the pages that it has fetched. If the cache setting is 0 MB, Prefetch is disabled. On one occasion at least it has been known for the cache settings to be corrupted in iCab's preferences, causing Prefetch to remain permanently disabled.
Information based on iCab Yahoo group posts by Sander Tekelenburg and ArneJohannessen, and questions by Lauren and by Roy Hilbinger.

-- DanielBeardsmore - 02 Jan 2005

(For the pedants, no, not all items that end in .htm(l) are plain HTML pages, you can set up the Web server to serve dynamic pages disguised as plain HTML pages; I think I have seen sites that do this. However, none of these types of pages should do anything stupid like log you out or one-click-purchase expensive ming vases...

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
risleynet
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback