Bug 42501 - Provide a WebView preference to disable link prefetching
Summary: Provide a WebView preference to disable link prefetching
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 194539
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-17 12:21 PDT by Jeff Johnson
Modified: 2023-01-25 05:02 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Johnson 2010-07-17 12:21:42 PDT
Link prefetching was landed in svn r63032:

http://trac.webkit.org/changeset/63032/trunk

Please add a WebView preference to disable link prefetching. This would be similar to the preference for disabling DNS prefetching landed in svn r62284:

http://trac.webkit.org/changeset/62284/trunk

Currently the link prefetching feature is protected by a header guard and not compiled in by default. Presumably, though, it will eventually be enabled for some platforms. Since the feature was requested by <rdar://problem/4158270>, Apple probably wants it on the Mac platform at some point.

There are valid reasons why a user would want to disable link prefetching, such as privacy and bandwidth. I believe that these were among the considerations that led to the feature being compiled out by default, so the considerations should continue to hold if the feature is compiled in.
Comment 1 Leon Clarke 2010-07-19 03:02:04 PDT
While I don't in any way object to this option being added, there is an argument that it isn't needed.
Mozilla's FAQ on the issue claims that any legitimate reason for wanting to disable the feature should be considered a bug in the implementation, although they do have a very hidden way of disabling it.
https://developer.mozilla.org/en/link_prefetching_faq#Is_there_a_preference_to_disable_link_prefetching.3f
When I was implementing this (originally on Android), we discussed whether there should be a user option to disable it, but were convinced by Mozilla's arguments and decided not to.

Leon
Comment 2 Jeff Johnson 2010-07-19 07:17:56 PDT
That comment in the Mozilla FAQ seems a bit silly. The privacy and bandwidth implications are inherent to the feature, not something you can code away. For example, there's no possible way that you can avoid using bandwidth to download linked pages.

To me, the real argument is in the next section of the FAQ: "The user preference to disable <link> tag prefetching may simply encourage websites to stick with JS/DOM hacks, and that would not be good for users."

I don't think this is a strong argument, however. There are very public browser preferences to disable Javascript, cookies, plugins, etc., but web developers continue to rely on them all the time. If the browsers support link prefetching, then the web developers will use it, because they will assume (correctly) that most people won't change the browser's default settings.