uBlock icon indicating copy to clipboard operation
uBlock copied to clipboard

Not all images blocked 'Block media elements larger than' set to 0kb

Open IOI-655321 opened this issue 8 years ago • 7 comments

Change the settings 'Block media elements larger than' set to 0kb. No images show generally.

Then go to

https://www.androidauthority.com/best-android-phones-568001/ or http://www.bbc.co.uk/news

Screenshot in which the issue can be seen

example images

Steps for anyone to reproduce the issue

  1. Change setting in uBlock origin to Block media elements larger than 0kb
  2. Go to https://www.androidauthority.com/best-android-phones-568001/ or http://www.bbc.co.uk/news
  3. See images loaded

Your settings

userSettings": { "advancedUserEnabled": false, "alwaysDetachLogger": false, "autoUpdate": true, "cloudStorageEnabled": true, "collapseBlocked": true, "colorBlindFriendly": false, "contextMenuEnabled": true, "dynamicFilteringEnabled": false, "externalLists": "", "firewallPaneMinimized": true, "hyperlinkAuditingDisabled": true, "ignoreGenericCosmeticFilters": false, "largeMediaSize": 0, "parseAllABPHideFilters": true, "prefetchingDisabled": true, "requestLogMaxEntries": 1000, "showIconBadge": true, "tooltipsDisabled": false, "webrtcIPAddressHidden": true }

  • OS/version: Windows 10 Enterprise Version 1703 Build 15063.674
  • Browser/version: Firefox 57.0.4 64 Bit
  • uBlock Origin version: 1.14.24
Your filter lists

"selectedFilterLists": [ "plowe-0", "disconnect-malware", "malware-1", "malware-0", "disconnect-malvertising", "easyprivacy", "adguard-spyware", "easylist", "ublock-unbreak", "ublock-abuse", "ublock-privacy", "ublock-badware", "ublock-filters", "user-filters" ]

Your custom filters (if any)

Nothing in 'My Filters'

IOI-655321 avatar Jan 16 '18 11:01 IOI-655321

I can reproduce on FF57, but not on Chromium.

gorhill avatar Jan 16 '18 13:01 gorhill

@gorhill On Chromium, every image which is blocked appears twice in the logger once blocked and once unblocked, is that on purpose ?

uBlock-user avatar Jan 16 '18 15:01 uBlock-user

It's normal. The images are first seen but not blocked by onBeforeRequest handler, and reported as such in the logger -- so you know that a connection to the remote server occurred.

Then they are blocked once uBO receives the response headers, and reported as such in the logger. It's impossible to block image by size in the onBeforeRequest handler, uBO needs the response headers.

gorhill avatar Jan 16 '18 15:01 gorhill

Doesn't happen with fonts when I use Block remote fonts, they only appear once, so it's specific to images only ?

uBlock-user avatar Jan 16 '18 15:01 uBlock-user

Fonts can be blocked by onBeforeRequest handler, no need to connect to remote server because no need for response headers.

gorhill avatar Jan 16 '18 15:01 gorhill

Another question, checking for size wouldn't be needed if I set the size to 0 kB or is it ?

uBlock-user avatar Jan 16 '18 15:01 uBlock-user

https://github.com/gorhill/uBlock/issues/1473#issuecomment-259244428

gorhill avatar Jan 16 '18 16:01 gorhill