Topic: [Feature] Don't download blacklisted thumbnails

Posted under Site Bug Reports & Feature Requests

Requested feature overview description.
Currently, blacklisted images are hidden like this: .blacklisted { display: none }

The problem is, most browsers download these images anyway because the src attribute of each blacklisted image is intact. I tried to make a script to avoid this, but it seems to be impossible - whenever a browser encounters any img src, something that happens long before Javascript execution, that image will be downloaded.

It's a simple thing to change, I think. On the server side, you could set a dummy attribute on blacklisted images (like data-src) which holds the thumbnail link. Then if someone presses "toggle blacklist", iterate through the blacklisted images with Javascript to set the actual src tag, so the thumbnails are downloaded as needed.

Why would it be useful?
It would save bandwidth, people won't be requesting and downloading thumbnails they don't want to see anyway.

Also, I'd rather not be downloading the things on my blacklist at all. Currently I am, they're just not visible to me.

What part(s) of the site page(s) are affected?
Blacklisted images on https://e621.net/post/index

Updated by abadbird

This has been suggested before, I have came up with a solution to fix it but have yet to test it because it might break stuff badly.

Updated by anonymous

Ah, glad to hear it. If there's anything I can do to help (doubtful), please let me know!

I did find the other request towards the end of the old feature request thread, which reminded me, on the less powerful machine I used to use blacklisted thumbnails would be visible for a couple of seconds before the blacklist kicked in. Another reason to do eet , sites are made to be broken.

Updated by anonymous

Your proposal seems reasonable. I think that in practice, since the blacklisting is handled entirely client-side, the data-src attribute would have to be set on *all* thumbnails (and the src attribute initially unset on all thumbnails.. and populated by the blacklist code on initial page-load.). This would probably introduce a small delay before thumbnails became visible.

Updated by anonymous

might be a good idea to make this togglable...toggleable? uh...you know what i mean. might be a good idea to do that too ahead of time if possible. one less request down the road.

Updated by anonymous

Thumbnails are still ~10kb, so unless you are blacklisting majority of things, the amount that is being downloaded as extra should be insanely small on modern internet connections. You can also think it in a way that you are still downloading less compared to if site had as much advertisement as your regular booru site containing explicit material.

And you can always set up your browser to empty cache every time you close it, so even if they are being downloaded into your local memory, they will then get deleted quickly as well. Or have scheculed ccleaner running.

I know these are not solutions to this particular issues, but at least there's some workarounds. Because blacklists are handled user side, it could take a while to implement something to fix this, so workarounds are the thing to use before implementation of something proper.

Updated by anonymous

  • 1