+ Reply to Thread
Results 1 to 4 of 4

Thread: image bufferring

  1. #1
    kbjradmin's Avatar
    kbjradmin is offline x10 Elder kbjradmin is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Washington State, USA
    Posts
    512

    image bufferring

    is there some way to pre-load or buffer the images in a website, before they are needed for use?

  2. #2
    xPlozion's Avatar
    xPlozion is offline x10 Elder xPlozion is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    Delaware, USA
    Posts
    872

    Re: image bufferring

    i think you can do it with javascript code. also, you can load the image offscreen at say -1000px by -1000px and then have the same file for when you need to load it.

    -xP

  3. #3
    VPmase's Avatar
    VPmase is offline x10 Elder VPmase is an unknown quantity at this point
    Join Date
    Nov 2007
    Location
    Dixon, IL, USA
    Posts
    914

    Re: image bufferring

    You don't necessarily have to have it in an img tag. You could have something like this:

    Code:
    <script>
    function preloadimg(){
    //Single Image Load
    var img = new Image();
    img.src = "www.YOUSITE.com/PATH/TO/IMAGE.jpg"; //Change to correct image link
    }
    function preloadimgs(){
    //Multiple Load
    var numofimgs = 5 //Change to the number of images you have
    var imgarray = new Array();
    for(i=0;i<numofimgs;i++){
    imgarray[i] = new Image();
    }
    imgarray[0].src = "www.YOUSITE.com/PATH/TO/IMAGE1.jpg";
    imgarray[1].src = "www.YOUSITE.com/PATH/TO/IMAGE2.jpg";
    imgarray[2].src = "www.YOUSITE.com/PATH/TO/IMAGE3.jpg";
    imgarray[3].src = "www.YOUSITE.com/PATH/TO/IMAGE4.jpg";
    imgarray[4].src = "www.YOUSITE.com/PATH/TO/IMAGE5.jpg";
    }
    </script>
    ...
    <body onload="preloadimg();">//Or preloadimgs()
    Last edited by VPmase; 09-24-2008 at 12:24 PM.

  4. #4
    kbjradmin's Avatar
    kbjradmin is offline x10 Elder kbjradmin is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Washington State, USA
    Posts
    512

    Re: image bufferring

    thank you VPmase. i will try this.

+ Reply to Thread

Similar Threads

  1. [java]background image
    By galaxyAbstractor in forum Programming Help
    Replies: 8
    Last Post: 09-13-2008, 02:12 PM
  2. 3000 credits for header image
    By bigjoe4 in forum The Marketplace
    Replies: 44
    Last Post: 05-02-2008, 11:35 AM
  3. Looking for a free pdf to image converter
    By Christopher in forum Off Topic
    Replies: 8
    Last Post: 01-11-2007, 03:50 PM
  4. errors while attaching
    By mattspec in forum Feedback and Suggestions
    Replies: 0
    Last Post: 12-19-2005, 01:50 PM
  5. November Desktop
    By n4tec in forum Off Topic
    Replies: 12
    Last Post: 11-08-2005, 07:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers