Re: How to prevent image load



On Dec 22, 9:49 am, Thomas 'PointedEars' Lahn <PointedE...@xxxxxx>
wrote:
john_woo wrote:
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
--
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, <f806at$ail$1$8300d...@xxxxxxxxxxxxxxxx>

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
.



Relevant Pages

  • Re: onload doesnt fire in Safari if src set to same img twice
    ... I speculated that it was not firing onload if the src image attribute ... That is more likely if the HTTP client is advised to cache the resource ... That happens because you cause the HTTP client to retrieve the document the ... Prototype.js was written by people who don't know javascript for people ...
    (comp.lang.javascript)
  • Re: How to set the default home page using php code in Firefox
    ... attribute must be of type _URI_, i.e. a URI or URI reference as defined ... day with a comrade who tried to convince me that the "javascript" scheme ... This is purely a matter of syntax, and if it fits the grammar, ...
    (comp.lang.javascript)
  • Re: DisplayTimeInStatusLine() - Help
    ... For testing purposes, put your .js file in the same folder. ... If you give a src attribute an improper source file, then IE will get a "404 Page not Found" file and insert it in the src since it can't find the file it was hunting. ... Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/ ...
    (comp.lang.javascript)
  • Re: Seltsame Werte von Document.Window.Size im WebBrowser nach optical_zoom command
    ... Nimm mal www.google.de/maps ohne Javascript, ... Uri uri = new Uri; ... CheckSize(sizeVorher, sizeNachher, sizeFactor); ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: onload doesnt fire in Safari if src set to same img twice
    ... tried to set the src attribute to a blank image, ... That is more likely if the HTTP client is advised to cache the resource ... and perhaps to display a non-image resource as an image: ... Prototype.js was written by people who don't know javascript for people ...
    (comp.lang.javascript)