Caching and downloading of resources like IMG's positioned outside visible screen area ? 
Author Message
 Caching and downloading of resources like IMG's positioned outside visible screen area ?

I would be very curious to know more about the downloading and caching behavior of IE6 when you have resources initially positioned
outside the visible screen co-ordinates.

My impression, now, is that all IMG tags and such are loaded before the window_onload event fires.

If that is true, then I'd like to find a strategy to defer loading of the resources that are off screen that the user will not see
because the user made a choice not to activate some optional facility.

In other words, when the user chooses to activate some display activity, then I will trigger downloading of the resources at that
time ... which should let the initial page completely display faster than if all resources are loaded at once.

Appreciate any pointers or suggestions.

best, Bill Woodruff
dotScience



Fri, 01 Jul 2005 14:22:54 GMT  
 Caching and downloading of resources like IMG's positioned outside visible screen area ?
Hi Bill

Sounds you're saying display:none, css property. If you apply the property,
the object is downloaded but not seen. You can change the value to be
visible whenever you need. e.g.

obj.style.display="block"

Hope I understand your question properly.

--
Have a nice day.
Han Pohwan, Microsoft MVP, Korea


Quote:
> I would be very curious to know more about the downloading and caching

behavior of IE6 when you have resources initially positioned
Quote:
> outside the visible screen co-ordinates.

> My impression, now, is that all IMG tags and such are loaded before the

window_onload event fires.
Quote:

> If that is true, then I'd like to find a strategy to defer loading of the

resources that are off screen that the user will not see
Quote:
> because the user made a choice not to activate some optional facility.

> In other words, when the user chooses to activate some display activity,

then I will trigger downloading of the resources at that
Quote:
> time ... which should let the initial page completely display faster than

if all resources are loaded at once.
Quote:

> Appreciate any pointers or suggestions.

> best, Bill Woodruff
> dotScience



Fri, 01 Jul 2005 19:14:33 GMT  
 Caching and downloading of resources like IMG's positioned outside visible screen area ?
Thanks, Han, for your reply !

In this case I want IMG's that are not initially seen on the screen to NOT be downloaded.

I have been experimenting with setting the initial SRC property of the IMG to an empty string, then
in an event handler setting the SRC property to the correct filename hoping that would trigger the
downloading of the IMG, but I haven't made any progress with that :

          ' this does not show an image properly
          ' when the initial IMG had its src property set to ""

          offScreenImage.src = "image32.png"
          offScreenImage.style.visibility="visible"

My next step, since I know you can dynamically switch between images, is try and have a "dummy image" defined to test the hypothesis
that setting the IMG src property to "" prevents future use.

best, Bill Woodruff
dotScience

| Hi Bill
|
| Sounds you're saying display:none, css property. If you apply the property,
| the object is downloaded but not seen. You can change the value to be
| visible whenever you need. e.g.
|
| obj.style.display="block"
|
| Hope I understand your question properly.
|
| --
| Have a nice day.
| Han Pohwan, Microsoft MVP, Korea
|


| > I would be very curious to know more about the downloading and caching
| behavior of IE6 when you have resources initially positioned
| > outside the visible screen co-ordinates.
| >
| > My impression, now, is that all IMG tags and such are loaded before the
| window_onload event fires.
| >
| > If that is true, then I'd like to find a strategy to defer loading of the
| resources that are off screen that the user will not see
| > because the user made a choice not to activate some optional facility.
| >
| > In other words, when the user chooses to activate some display activity,
| then I will trigger downloading of the resources at that
| > time ... which should let the initial page completely display faster than
| if all resources are loaded at once.
| >
| > Appreciate any pointers or suggestions.
| >
| > best, Bill Woodruff
| > dotScience
| >
| >
|
|



Sat, 02 Jul 2005 05:13:11 GMT  
 Caching and downloading of resources like IMG's positioned outside visible screen area ?
Hi Bill

I tried what I think you want, and no problem. More exactly
retrieving/rendering a picture when I want works.

<HTML><BODY>
<script language=VBScript>
sub window_onload
 i.src="x.bmp"
 i.style.display="block"
end sub
</script>
<img id=i style="display:none">

--
Have a nice day.
Han Pohwan, Microsoft MVP, Korea


Quote:
> Thanks, Han, for your reply !

> In this case I want IMG's that are not initially seen on the screen to NOT
be downloaded.

> I have been experimenting with setting the initial SRC property of the IMG

to an empty string, then
Quote:
> in an event handler setting the SRC property to the correct filename

hoping that would trigger the
Quote:
> downloading of the IMG, but I haven't made any progress with that :

>           ' this does not show an image properly
>           ' when the initial IMG had its src property set to ""

>           offScreenImage.src = "image32.png"
>           offScreenImage.style.visibility="visible"

> My next step, since I know you can dynamically switch between images, is

try and have a "dummy image" defined to test the hypothesis
Quote:
> that setting the IMG src property to "" prevents future use.

> best, Bill Woodruff
> dotScience




Quote:
> | Hi Bill
> |
> | Sounds you're saying display:none, css property. If you apply the
property,
> | the object is downloaded but not seen. You can change the value to be
> | visible whenever you need. e.g.
> |
> | obj.style.display="block"
> |
> | Hope I understand your question properly.
> |
> | --
> | Have a nice day.
> | Han Pohwan, Microsoft MVP, Korea
> |


> | > I would be very curious to know more about the downloading and caching
> | behavior of IE6 when you have resources initially positioned
> | > outside the visible screen co-ordinates.
> | >
> | > My impression, now, is that all IMG tags and such are loaded before
the
> | window_onload event fires.
> | >
> | > If that is true, then I'd like to find a strategy to defer loading of
the
> | resources that are off screen that the user will not see
> | > because the user made a choice not to activate some optional facility.
> | >
> | > In other words, when the user chooses to activate some display
activity,
> | then I will trigger downloading of the resources at that
> | > time ... which should let the initial page completely display faster
than
> | if all resources are loaded at once.
> | >
> | > Appreciate any pointers or suggestions.
> | >
> | > best, Bill Woodruff
> | > dotScience
> | >
> | >
> |
> |



Sat, 02 Jul 2005 05:35:03 GMT  
 Caching and downloading of resources like IMG's positioned outside visible screen area ?
Thanks, Han,

Late last night I was also able to get this working. The goal for me in doing this is to get the first view
of the web page to come up faster since off-screen graphic resources will not be loaded.

What would be of great interest to me would be to know if IE, when it loads a page, takes a look at the image positioning as it
parses the page into a DOM and automatically decides not to load those IMG resources which are outside the client area of the
browser.

best, Bill

| Hi Bill
|
| I tried what I think you want, and no problem. More exactly
| retrieving/rendering a picture when I want works.
|
| <HTML><BODY>
| <script language=vbscript>
| sub window_onload
|  i.src="x.bmp"
|  i.style.display="block"
| end sub
| </script>
| <img id=i style="display:none">
|
| --
| Have a nice day.
| Han Pohwan, Microsoft MVP, Korea
|


| > Thanks, Han, for your reply !
| >
| > In this case I want IMG's that are not initially seen on the screen to NOT
| be downloaded.
| >
| > I have been experimenting with setting the initial SRC property of the IMG
| to an empty string, then
| > in an event handler setting the SRC property to the correct filename
| hoping that would trigger the
| > downloading of the IMG, but I haven't made any progress with that :
| >
| >           ' this does not show an image properly
| >           ' when the initial IMG had its src property set to ""
| >
| >           offScreenImage.src = "image32.png"
| >           offScreenImage.style.visibility="visible"
| >
| > My next step, since I know you can dynamically switch between images, is
| try and have a "dummy image" defined to test the hypothesis
| > that setting the IMG src property to "" prevents future use.
| >
| > best, Bill Woodruff
| > dotScience
| >


| > | Hi Bill
| > |
| > | Sounds you're saying display:none, css property. If you apply the
| property,
| > | the object is downloaded but not seen. You can change the value to be
| > | visible whenever you need. e.g.
| > |
| > | obj.style.display="block"
| > |
| > | Hope I understand your question properly.
| > |
| > | --
| > | Have a nice day.
| > | Han Pohwan, Microsoft MVP, Korea
| > |


| > | > I would be very curious to know more about the downloading and caching
| > | behavior of IE6 when you have resources initially positioned
| > | > outside the visible screen co-ordinates.
| > | >
| > | > My impression, now, is that all IMG tags and such are loaded before
| the
| > | window_onload event fires.
| > | >
| > | > If that is true, then I'd like to find a strategy to defer loading of
| the
| > | resources that are off screen that the user will not see
| > | > because the user made a choice not to activate some optional facility.
| > | >
| > | > In other words, when the user chooses to activate some display
| activity,
| > | then I will trigger downloading of the resources at that
| > | > time ... which should let the initial page completely display faster
| than
| > | if all resources are loaded at once.
| > | >
| > | > Appreciate any pointers or suggestions.
| > | >
| > | > best, Bill Woodruff
| > | > dotScience
| > | >
| > | >
| > |
| > |
| >
| >
|
|



Sat, 02 Jul 2005 09:05:07 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. HELP: scrollTo() wont scroll outside visible area!!!!

2. keep title-tooltip visible on moving IMG ?

3. Cache problems with IMG with same SRC

4. Avoid caching when modifying IMG tags?

5. Cache problems with IMG with same SRC

6. Getting left,top positions of an img object...

7. 'POST' resource format

8. Question about Level 2 PostScript 'resources'

9. Explorer Cache Files not Visible in FileBox?

10. Need to download prnmgr from Win2K Resource Kit

11. Can't Make Excel Visible w/ASP on IIS

12. Downloading a resource which can be opened in a browser

 

 
Powered by phpBB® Forum Software