Ublock: RFE: When ☑Block media elements larger than = 0kB, no requests should be made to media elements

Created on 14 Mar 2016  Â·  11Comments  Â·  Source: gorhill/uBlock

Read first: https://github.com/gorhill/uBlock/blob/master/CONTRIBUTING.md

Describe the issue

It says in the wiki page regarding the "No large media elements" option: "Note that this feature has no privacy value: a connection to the remote server must be performed in order to fetch the size of the resource."

When the setting is set to "Block large media elements larger than 0 kB", there should be no need to issue that request;

One or more specific URLs where the issue occurs

[URL(s) for issue on a specific site are mandatory]

Screenshot in which the issue can be seen

[Screenshot(s) for visual issues are mandatory]

Steps for anyone to reproduce the issue

  1. Be as detailed as possible:
  2. Because we are not looking over your shoulder and
  3. Keep in mind: Nobody can read your mind.

    Your settings

[If you fail to provide this info, I will mark the issue as invalid. Lists all settings which differs from default settings]

  • Browser/version:
  • uBlock Origin version:
Your filter lists

[Example: "Default filter lists + FRA", or "Default filter lists minus uBlock -- Badware risks"]

Your custom filters (if any)
declined

Most helpful comment

Done :)

All 11 comments

For some reason, the issue got saved before I finished writing. Here's the continuation:

…[there should be no need to issue that request;] I doubt that 0-byte media elements that are necessary for Web pages to work are fairly rare.

One or more specific URLs where the issue occurs

For example: Loading http://q13fox.com/2016/03/13/man-killed-toddler-rescued-after-car-hit-by-tree-in-seattle-park/ issues request to https://tribkcpq.files.wordpress.com/2015/12/pearl-harbor-8.jpg?w=370&h=204&crop=1 which is not loaded, even though there is no need to do anything with the information downloaded by that request.

Screenshot in which the issue can be seen

https://archive.org/download/Liquid-2016-03-14-12-13-47-N-2d303430300a-c5a90ee0-4738-4ce8-b784-544d726c5cae/Screen%20Shot%202016-03-14%20at%2012.13.21.35000.-0400.png

https://archive.org/download/Liquid-2016-03-14-12-13-47-N-2d303430300a-c5a90ee0-4738-4ce8-b784-544d726c5cae/Screen%20Shot%202016-03-14%20at%2012.13.22.65400.-0400.png

Steps for anyone to reproduce the issue

Using uBlock Origin v.1.6.4 in Firefox Developer Edition 47.0a2:

Your settings

https://archive.org/download/Liquid-2016-03-14-12-18-42-N-2d303430300a-3b5a6b9f-6da0-4328-b0b0-ac2f4ef93724/my-ublock-backup_3_14_2016%2c_12_18_16_PM.txt

  • Browser/version: Firefox Developer Edition 47.0a2
  • uBlock Origin version: 1.6.4

Your filter lists

See list in https://archive.org/download/Liquid-2016-03-14-12-18-42-N-2d303430300a-3b5a6b9f-6da0-4328-b0b0-ac2f4ef93724/my-ublock-backup_3_14_2016%2c_12_18_16_PM.txt

See list in https://archive.org/download/Liquid-2016-03-14-12-18-42-N-2d303430300a-3b5a6b9f-6da0-4328-b0b0-ac2f4ef93724/my-ublock-backup_3_14_2016%2c_12_18_16_PM.txt

It appears that I fucked up the Markdown syntax there, sorry for the ugly post....

That sounds like a good special case: If the upper limit for media elements is 0 bytes, treat it as a request to block all media elements outright, without even making a request to inspect the headers.

@ethus3h It'd be much more helpful if you made the title of this issue far more descriptive. I came here reading the title, thinking you didn't know about the :white_large_square:Block media elements larger than kB option. Maybe modify to read something like "RFE: When ☑Block media elements larger than0kB, no requests should be made to media elements"?

Done :)

After careful consideration, and a working prototype (as far as in a commit state), I prefer to decline this feature -- I reverted the code.

Blocking all images through a max size of zero is _exceptional_, but the code to handle that exceptional use affect too much the _main_ code path: the fact that uBO caches internal result for efficiency complicate a bit too much for my taste the main code path internally.

As stated in the wiki, there is no privacy value to blocking media elements according to their size, so to not block at onBeforeRequest level is not an issue.

Where can I find the code for it, so I can include it in my own copy? Thanks!

It's lost, I scrapped the whole thing.

How can I prevent any requests to media elements until I click them, if not using that feature?

You can't.

ugh, so I guess I've got to implement it myself... I… do not like javascript, lol. Thanks for letting me know the issue's closed so I can start in on it.

Was this page helpful?
0 / 5 - 0 ratings