How to prevent image load

J

john_woo

Hi,

I'm wondering whether it is possible that makes page load image only
on demand.

is there any idea?
 
B

Bart Van der Donck

john_woo said:
I'm wondering whether it is possible that makes page load image only
on demand.

is there any idea?

You have failed to formulate a concise, clear and coherent question.
 
T

Thomas 'PointedEars' Lahn

john_woo said:
I'm wondering whether it is possible that makes page load image only
on demand.

is there any idea?

If you add the `img' or `object' element objects to the DOM tree yourself,
or provide a URI for the `src' or `data' attribute of the respective `img'
or `object' elements that does not refer an image resource at first, then
the corresponding images will not load before that takes place or you modify
the `src' or `data' attribute of those elements to refer to an image resource.

In any other way that is not possible, at least not interoperably, as
client-side DOM script support does not even have to be present, let alone
sufficiently enabled.


HTH

PointedEars
 
J

john_woo

If you add the `img' or `object' element objects to the DOM tree yourself,
or provide a URI for the `src' or `data' attribute of the respective `img'
or `object' elements that does not refer an image resource at first, then
the corresponding images will not load before that takes place or you modify
the `src' or `data' attribute of those elements to refer to an image resource.

In any other way that is not possible, at least not interoperably, as
client-side DOM script support does not even have to be present, let alone
sufficiently enabled.

HTH

PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <[email protected]>

Thanks for the idea.
However if the URI points to a none image source, then the web page
will display a small red box, that doesn't look good.

John
 
T

Thomas 'PointedEars' Lahn

john_woo said:
If you add the `img' or `object' element objects to the DOM tree yourself,
or provide a URI for the `src' or `data' attribute of the respective `img'
or `object' elements that does not refer an image resource at first, then
the corresponding images will not load before that takes place or you modify
the `src' or `data' attribute of those elements to refer to an image resource.

In any other way that is not possible, at least not interoperably, as
client-side DOM script support does not even have to be present, let alone
sufficiently enabled.
[...]

Thanks for the idea.

You're welcome.
However if the URI points to a none image source, then the web page
will display a small red box,

In Microsoft Internet Explorer.
that doesn't look good.

True. So you could either set their `visiblity' style property to `hidden'
or their `display' style property to `none' at first. Or you would add the
`img' or `object' elements when they are needed. Be sure to provide a
no-script/no-DOM alternative in any case.


Please trim your quotes to the minimum required to retain context, as also
explained in the http://jibbering.com/faq/


PointedEars
 

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
474,146
Messages
2,570,832
Members
47,374
Latest member
EmeliaBryc

Latest Threads

Top