CSS - images set to "invisible" - do they still download?

R

RobM

Greetings

Looking at adding appropriate handheld access to a web application. As its
JSP based, considering a combination of the use of "media" stylesheets
("screen" for normal, and "handheld" for ... handheld) and dynamic JSP
(after testing useragent) to cut down the size of what's presented.

Question: does anyone know that when I have images (all or some) in the
style sheet set to display: none; the (handheld) browser will still download
them but not display? (i.e. still bigger bandwidth). I would assume they're
not downloaded? If they are, well control that dynamically from the server

Thanks all
Cheers
Rob
 
S

Spartanicus

RobM said:
Question: does anyone know that when I have images (all or some) in the
style sheet set to display: none; the (handheld) browser will still download
them but not display?

Depends on the UA, some do, some don't.
 
T

Toby Inkster

RobM said:
Question: does anyone know that when I have images (all or some) in the
style sheet set to display: none; the (handheld) browser will still download
them but not display? (i.e. still bigger bandwidth). I would assume they're
not downloaded? If they are, well control that dynamically from the
server

It very much depends on the browser. Some are smart enough to download
only the images they need. Others seem to simply download all images
linked to by the CSS, assuming they'll be needed at some point in time.

This is something to bare in mind if you use a large background image on
just one or two pages.

BODY.special { background-image: url("large-bg.png"); }

in your stylesheet may download the large-bg.png image even on non-special
pages.
 
R

RobM

RobM said:
Greetings

Question: does anyone know that when I have images (all or some) in the
style sheet set to display: none; the (handheld) browser will still download
them but not display? (i.e. still bigger bandwidth). I would assume they're
not downloaded? If they are, well control that dynamically from the server

Thanks all
Cheers
Rob

Thanks for the replies, guys. Seems the way to go is (if yer using
dynamics.. asp/jsp) do it at the source for the big stuff (graphics), media
css for widths and placements.

Cheers
Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top