Note that there are some explanatory texts on larger screens.

plurals
  1. POA way to prevent a mobile browser from downloading and displaying images
    text
    copied!<p>Is there a simple way to prevent browser from downloading and displaying images, best would be via some magic style tag or javasctipe.</p> <p>The thing is, I'd like to tweak the company's website a bit to be more usable via mobile devices. The company is a gaming one, there's like 5MBs of images on it's main page (and those can't be touched). They alredy display deadly slow on my dsl, and they can be killers to someone who's paying for his GPRS per MB ;)</p> <p>The code of the page is not mine and shouldn't be touched too (in fact, it should be written from scratch, but it's not in my gesture to do it now) :)</p> <p>I was thinking about two solutions:</p> <p>1) If there was some kind of style-tag (or maybe a javascript? the one that would work on mobile browsers tho) that would prevent browser from downloading images and force to display alt-parameter instead I could simply attach this style if I discovered a user-agent to be some known mobile thing. or 2) I could tweak the webserver a bit to check the User-agent header and if client requests an image (.png, .gif and .jpg) send 404 instead. That has a downside tho - I'd like to allow the user to view images if he actually wants to.</p> <p>It seems that first solution would be best - what you guys think? And is there a javascript way to do it? </p> <p>I could try building document DOM, then get all <code>&lt;img&gt;</code> elements, and replace their <code>src</code> with some placeholder even but will that work on most mobile browsers (Opera Mini I suppose, the Windows Mobile thingy, the basic Symbian browser from Nokia)? And would playing with document DOM be a good solution on a mobile device (I'm not sure about it's memory-and-cpu requirements to be honest).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload