You are here: Re: Question, need expert help pre-loading images properly (IE + FireFox), thank you :) « HTML « IT news, forums, messages
Re: Question, need expert help pre-loading images properly (IE + FireFox), thank you :)

Posted by David Mark on 10/28/07 08:57

On Oct 27, 10:02 pm, Bone Ur <bon...@example.com> wrote:
> On Fri, 26 Oct 2007 00:25:53 GMT Peter Michaux wrote:
>
>
>
>
>
> >> I am seeking a easy to maintain and more importantly *working* way to
> >> pre-fetch images, so the pages I develop load smoothly without seeing
> >> the images kick in flicker as they usually do. Important - I need
> >> this to work on Internet Explorer 6.0+ and FireFox.
>
> >> I am presently using at the head of the page,
>
> >> pic100= new Image;
> >> pic100.src="./imageme.gif";
>
> > I'm rewriting some old preload code to try to reduce server
> > connections. For some reason, after the window.onload event, each use
> > of the following code
>
> > var img = new Image();
> > img.src = someUrl;
>
> > causes a new connection to the server (Apache). Because many (~100)
> > images now need to be preloaded, this is causing Apache grief. (I
> > didn't write the specs on this page. It is legacy and needs a quick
> > fix until I have time for a real solution.)
>
> > If the same many images are just written into the page with <img
> > src="someUrl"> the same initial connection is being used to get all
> > images. I believe this is Apache's pipelining feature at work to
> > conserve connections.
>
> > Does anyone know about this situation and is their a standard
> > solution?
>
> > I have a few ideas to try when the server admin is available but I
> > thought I'd ask since the topic has appeared.
>
> You can j/s preload sequentially: ie, not starting the following preload
> until the previous is finished. I've done that and it works. But a
> better idea (I think) is just to make a position:absolute;
> visibility:hidden; div "layer" encompassing all the images which won't
> show because of the css.

That will mess up the semantics of the page and will look strange when
style is disabled. For the scriptless approach, it is better to use
background images.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация