Suggestion: Don't download hidden items

Various discussions related to Adblock Plus development
Post Reply
eszems
Posts: 2
Joined: Thu May 07, 2015 6:38 pm

Suggestion: Don't download hidden items

Post by eszems »

As much as I can tell, hidden elements, especially images, are still downloaded. This is unnecessary and disadvantageous for a number of reasons. Could you change this?
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Suggestion: Don't download hidden items

Post by mapx »

The hiding filters are created for the elements on the page (css elements) which can't be blocked (they are part of the html page).
Sometimes is created some hiding filter which hides some images (other objects) (and which are downloaded). In those cases it would be better to block also the images / other objects.
eszems
Posts: 2
Joined: Thu May 07, 2015 6:38 pm

Re: Suggestion: Don't download hidden items

Post by eszems »

I used Element Hiding Helper for hiding unnecessary elements of a page, which contained images, too. However there are images in the needed parts of the page too, and the main purpose of hiding would be to save some downloading bytes. (I am on a byte-limited connection.) Some elements contained many images, so this way I could hide them together. It would be good if page elements hidden this way would automatically prevent hidden elements (especially images) from downloading.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Suggestion: Don't download hidden items

Post by mapx »

As I said, first block those images, then (if still necessary) create hiding filters.
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: Suggestion: Don't download hidden items

Post by lewisje »

Sorry, but display:none is the best we can do, there's no CSS rule like download:no or something, and in order to automatically block images inside hidden elements, ABP would need to parse the page content for URLs and detect whether they are inside hidden content, and that leads to slow performance; it's the same reason ABP does not remove HTML or filter based on HTML content: forum/viewtopic.php?t=5977

It's better to look at the URLs of the image files and figure out patterns for blocking rules.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Post Reply