Bug 117678 - [RFE] Add 'reason' field to WebKitNetworkRequest (WK1) and WebKitResponsePolicyDecision (WK2)
Summary: [RFE] Add 'reason' field to WebKitNetworkRequest (WK1) and WebKitResponsePoli...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 120195
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-15 22:25 PDT by Ben Boeckel
Modified: 2017-03-11 10:54 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Boeckel 2013-06-15 22:25:21 PDT
I'm looking to implement adblock support (via adblockplus's format) to Uzbl and it would be nice to have a 'reason' for why a request is being made. As an example, the format supports only blocking requests based on the fact that it's a stylesheet, a script, image, XMLHttpRequest, etc. Documentation for the format is here[1].

[1]https://adblockplus.org/en/filters#options
Comment 1 Alexey Proskuryakov 2013-06-16 14:22:09 PDT
Is the idea that XMLHttpRequest can never be used to retrieve an image or a script? That would be obviously incorrect.
Comment 2 Ben Boeckel 2013-06-16 15:30:46 PDT
That's probably one use. I think it's mainly used to try and consolidate rules together. A directory might contain CSS that is clean, but the JS is unwanted, so the rule has '~stylesheet' as an option. There are *lots* of rules (I have 42k from easylist), so collapsing rules differing by a '*.js' and '*.html' is useful.

I have seen sites load URIs such as "data:image/jpeg;base64goop" presumably to get around adblockers.
Comment 3 Ben Boeckel 2013-08-22 20:02:34 PDT
Looking down in WebCore itself, this data isn't exposed AFAICS. I'll open a separate bug for it.