QuantumBadger / RedReader

An unofficial open source Android app for Reddit.
GNU General Public License v3.0
2.03k stars 483 forks source link

[Request] More control over images while on cellular network #435

Open Hund opened 7 years ago

Hund commented 7 years ago

It would be nice if you could perhaps prevent images larger than X bytes from loading if you're on a cellular network. And perhaps have to manually verify that you want to view the image?

Or perhaps some way of telling how large it is before opening it?

I'm on a small data plan and I tend to spend more bandwidth on Reddit than I want to. :)

QuantumBadger commented 7 years ago

Thanks for the suggestion. It's easy to detect the size of some images (e.g. on imgur/gfycat where we have API access), but not so easy for others. So unless it's possible to find a reliable way of stopping the download after receiving the HTTP content length header, the warning could be a bit inconsistent.

ajgoda90 commented 7 years ago

If you use a HEAD method instead of a GET, you'll get the HTTP header without the body. See section 9.4 in https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html