How assign the sequence of boot the files with server in cache?

They have: 3 posts

Joined: Jun 2000

How assign the sequence of boot the files with server in cache?
Example:

<BODY>
<IMG SRC="IMG1.GIF">

blah blah blah ...

<IMG SRC="IMG2.JPG"> While picture IMG2.JPG completely is not loaded, not to allow loading IMG3 with server in cache

<IMG SRC="IMG3.GIF">

blah blah blah ...

</BODY>

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi,

My understanding is that the browser (because it deals with interpretive rather than compiled code) will load things from top to bottom. Therefore, if img3 is cached, img2 should also be cached since it came first.
If you are talking about preloading images, simply do so in the javascript script tags

pic1 = "images/pic1.gif";

then in the body in your img tag, you can put:
<img src=pic1.....

The browser will load each pic within the script tags from top to bottom and cache them until needed within the document's body

Vinny

------------------
my site:GrassBlade: cut&paste javascript
moderator at:The Javascript Place
Javascript City

[This message has been edited by Vincent Puglia (edited 11 June 2000).]

Where the world once stood
the blades of grass cut me still

They have: 231 posts

Joined: Feb 2000

Vinny:

The code you listed will not preload an image. It just stores a url into a string. You need to do the following.

pic1 = new Image();
pic1.src = "images/pic1.gif";

:: Lloyd Hassell :: http://www14.brinkster.com/lloydh ::

They have: 3 posts

Joined: Jun 2000

Hi, Vinny!

>The browser will load each pic within the >script tags >from top to bottom and cache >them until needed within >the document's >body

Thank you for answer, but this not so. Theoretically - correct. Beside me at examination on local computer all work beautifully, but when has tried with server, has seen that IMG3 falls into cache quicker, than IMG2 - here is in this and problem. Question in that, possible in principal forbid loading with server in cache IMG3 until it is loaded IMG2 ?

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi Lloyd,

I'm sorry; you're right. The only excuse I have is gray matter slippage or calcification.

Bonjour Valeri,

If you use Lloyd's example, it should work as advertised. If the problems persist, could you supply some code? What kind of server are you using?

Vinny

------------------
my site:GrassBlade: cut&paste javascript
moderator at:The Javascript Place
Javascript City

Where the world once stood
the blades of grass cut me still

They have: 3 posts

Joined: Jun 2000

Hi Vinni !

I test its code on Apache, but want to control on the part of client.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.