Search Results

Search found 188 results on 8 pages for 'preload'.

Page 2/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • Preload Images with javascript

    - by user271619
    Here is my preload script: <script type="text/javascript"> Image_1 = new Image(1,1); Image_1.src = "images/sprites.png"; </script> And it works fine. I can see in the headers the image loading. Here's my question. Even though I have preloaded sprites.png, I notice that when I go to a page on my site that simply displays that entire image, the headers tell me my browser is requesting the server to send the image again. I'm hoping to not sound too naive. But, why would the browser request the image when I preloaded it earlier? Are there other reasons the browser would need to re-request? Also, I put the dimensions as Image(1,1). Sometimes I don't know the dimensions, as that image gets updated from time to time. Maybe that's a reason?

    Read the article

  • start to preload content after a complete page load

    - by amit
    i am trying to make the preloading work in such a way that the components i wish to preload start to load after successfully loading the page. for example, i have index.php. i want it to load up completely. as soon as it loads up i want to start loading the other components. to make things clear. i have a nav that makes use of large size images. if i load them along with the index.php file, it would increase load up time of the page. i wish for those large images to load after completely rendering index.php? am i making sense? is it possible?

    Read the article

  • GNOME/KDE Linux entirely in RAM?

    - by František Žiacik
    Hi. I'd like to have very responsive linux but I also like modern, elegant and functional desktops like gnome or kde, not the lightweight ones like xfce or lxde. Once I tried PuppyLinux and was impressed by the responsivity when I clicked an application. In my Ubuntu, it bothers me much when I click chromium and must wait 5 seconds of disk flashing until main window appears. Or evolution or anything else. Is it possible to make GNOME or KDE run entirely in RAM like PuppyLinux (of course, I mean frequently used applications and services, not all) if you have enough of it? I don't care if boot time is longer. I tried using "preload" but it didn't help much.

    Read the article

  • [jQuery] preload image and show a spinner while loading

    - by robertdd
    Hy, i use uploadify to upload some images, after i display all the images thumbs in a list, when i click on a image thumb a bigger image it's open in a div with this function $(".thumbs li a").click(function(){ var largePath = $(this).attr("href"); $('.thumbs li').removeClass('thumbac'); $(this).parent().addClass('thumbac'); $("#largeImg").attr({ src: largePath }); return false; }); here is my list of photos: <div class="upimage"> <ul id="upimagesQueue" class="thumbs"> <li id="liupimages"> <a href="uploads/0001.jpg"><img src="uploads/0001.jpg" alt="0001.jpg" id=""></a> </li> <li id="liupimages"> <a href="uploads/0002.jpg"><img src="uploads/0002.jpg" alt="0002.jpg" id=""></a> </li> <li id="liupimages"> <a href="uploads/0003.jpg"><img src="uploads/0003.jpg" alt="0003.jpg" id=""></a> </li> <script> $(".thumbs li a").click(function(){ var largePath = $(this).attr("href"); $('.thumbs li').removeClass('thumbac'); $(this).parent().addClass('thumbac'); $("#largeImg").attr({ src: largePath }); return false; }); </script> </ul> </div> this is the div where the images appear <div class="largeImg" > <img id="largeImg" src="" /> </div> how i can preload the image before it display?

    Read the article

  • Pre-load audio files at the client-side for later use

    - by awj
    I'm building an online test which implements audio (mp3) using the native audio player (i.e. non Flash-based). The test shows one question at a time and loads each subsequent question asynchronously. Some questions have an accompanying audio file, others don't, and the audio files can be several MB in size. So what I'm hoping to do is to preload the audio files client-side at the start of the test and then move these into place when the relevant question comes up. So far I've tried loading an audio file into a QuickTime player, then when that question comes up I use jQuery's clone(true) method to copy this into a part of the page which is displayed. However, when I do this the QuickTime player has to reload the audio file from source. Same is true for Windows Media Player. Does anyone have any suggestions as to how I can preload the audio client-side and then call it forward when needed?

    Read the article

  • jQuery/JavaScript: Trigger when preloaded

    - by user317563
    Hello there, jQuery has the .ready() function, but I am unsure whether this is what I need: I set a default background image in CSS (imange 1 out of 4), once document is loaded (images and all, not only DOM); I want to start preloading background image 2 out of 4. Once that is loaded, I want to fade image 1 into image 2. Then I want to preload the next image (3 out of 4), once that is loaded, I want to fade from background image 2 into image 3, and finally preload image 4. Once image 4 is loaded, i would like to fade image 3 into image 4. After that, I want to cycle between the images with a set time interval. What strategy would I use to solve this? .load() function? Thank you for your time. Kind regards,Marius

    Read the article

  • Preload IFrame or load with Ajax.

    - by sidcom
    Hi all im building a web user interface. In this interface i use popup divs to capture user input and other tasks. On on of my popups i need to post a form so that i can handle uploaded files. Id like to do this in an iframe so that it dosent effect the main page form. Id like to know if there are any drawbacks to this method and if i should load the iframe into the page at startup or output the iframe via an ajax routine.

    Read the article

  • Preload *.wav with SystemSoundID?

    - by fuzzygoat
    I am playing a wav file to give a little audio feedback when a button in my UI is pressed. My question is when you first press the button there is a delay (about 1.5secs) whilst the sound file "sound.wav" is loaded and cached. Is there a way to pre-cache this file (maybe in my viewDidLoad)? I guess I could do it by just playing it a viewDidLoad, but would really need to disable the audio so it does not "beeb" each time the app starts. many thanks for and help. gary EDIT: Looks like my question is a duplicate of this post unless anyone has any new info? Maybe a way to turn the play volume down temporarily, unless the audio is cleared each time through the run loop.

    Read the article

  • preload image with jquery

    - by robertdd
    Updated: firs append a empty image and a span with some text hide the loading image, after it's load it's show the image var pathimg = "path/to/image" + "?" + (new Date()).getTime(); $('#somediv').append('<div><span>loading..</span><img id="idofimage" src="" alt="" ></div>') jQuery("#idofimage").hide().attr({"src":pathimg}) .load(function() { jQuery(this).show(); }); old post ok, I spent 2 days trying to preloaded images but no succes! i have this function: jQuery.getlastimage = function(id) { $.getjs(); $.post('operations.php', {'operation':'getli', 'id':id,}, function(lastimg){ $("#upimages" + id).html('<a href="uploads/'+ lastimg +'?'+ (new Date()).getTime() +'"><img class="thumbs" id="' + id + '" alt="' + lastimg + '" src="uploads/' + lastimg +'?'+ (new Date()).getTime() + '" /></a>'); }); }; lastimg is the name of the image while the image loading i want to appear a gif or a text "Loading...". the function will get something like this: <div class="upimage"> <ul class="thumbs" id="upimagesQueue"> **<li id="#upimagesRIFDIB"> <a href="uploads/0001.jpg?1271800088379"> <img src="uploads/0001.jpg?1271800088379" alt="0001.jpg" id="RIFDIB" class="thumbs"> </a> </li>** <li> .... </li> </ul> </div> i tried like this: ... $.post('operations.php', {'operation':'getli', 'id':id,}, function(lastimg){ $("#upimages" + id) .html('<a href="uploads/'+ lastimg +'?'+ (new Date()).getTime() +'"><img class="thumbs" id="' + id + '" alt="' + lastimg + '" src="uploads/' + lastimg +'?'+ (new Date()).getTime() + '" /></a>') .hide() .load(function() { $(this).show(); }); ... but all the <li> will hide and after is loading the image appear, i want the <li> to apear with a gif or a text in it and after the image is loaded the link and the image to apear! How to do this? Anyone have an idea? Thanks!

    Read the article

  • preload image with jquery

    - by robertdd
    ok, I spent 2 days trying to preloaded images but no succes! i have this function: jQuery.getlastimage = function(id) { $.getjs(); $.post('operations.php', {'operation':'getli', 'id':id,}, function(lastimg){ $("#upimages" + id).html('<a href="uploads/'+ lastimg +'?'+ (new Date()).getTime() +'"><img class="thumbs" id="' + id + '" alt="' + lastimg + '" src="uploads/' + lastimg +'?'+ (new Date()).getTime() + '" /></a>'); }); }; while the image loading i want to appear a gif or a text "Loading...". the function will get something like this: <div class="upimage"> <ul class="thumbs" id="upimagesQueue"> **<li id="#upimagesRIFDIB"> <a href="uploads/0001.jpg?1271800088379"> <img src="uploads/0001.jpg?1271800088379" alt="0001.jpg" id="RIFDIB" class="thumbs"> </a> </li>** <li> .... </li> </ul> </div> i tryed like this: ... $.post('operations.php', {'operation':'getli', 'id':id,}, function(lastimg){ $("#upimages" + id) .html('<a href="uploads/'+ lastimg +'?'+ (new Date()).getTime() +'"><img class="thumbs" id="' + id + '" alt="' + lastimg + '" src="uploads/' + lastimg +'?'+ (new Date()).getTime() + '" /></a>') .hide() .load(function() { $(this).show(); }); ... but all the <li> will hide and after is loading the image appear, i want the <li> to apear with a gif or a text in it and after the image is loaded the link and the image to apear! How to do this? Anyone have an idea? Thanks!

    Read the article

  • Opengl-es android best way to preload images

    - by lacas
    I have a game app, and i have many screens. The first screen will be the SCREEN.LOADING screen. When the app starting, I want to show a picture "loading please wait" while the images, menus, etc loaded succesfull. I tried asynctask to do this, but its not work in GLThread. What is the way to do this in opengl-es? 03-06 12:46:35.282: ERROR/AndroidRuntime(32736): Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() Thanks, Leslie

    Read the article

  • Rails: How to preload a message to user

    - by Michael
    I have a Rails based prelaunch site that has some rotating background images (which are important for selling the idea of the site) that are taking too long to load, such that the users are leaving the site before they load. The only thing they're seeing is the email submission box. What's a good way to show a message to the users that the site will take some time to load but then have that message disappear after a reasonable period of time. I'm guessing a jQuery fadeOut() with a timer, but I'm not sure how long to set the timer for, because I'm not sure at what time it would start counting. Any suggestions?

    Read the article

  • Is there a built-in way to determine the size of a WCF response?

    - by jaminto
    Before a client gets the full payload of the web request, we'd like to first send it a measurement of the size of the response it will get. If the response will be too large, the client will present a message to the user giving them the option to abort the operation. We can write some custom code to preload the response on the server, determine the size, and then pass it on to the client, but we'd rather not if there's another way to do it. Does anyone know if WCF has any tricky way to do this? Or are there any free third party tools out there that will accomplish this? Thanks.

    Read the article

  • How best to pre-install OR pre-load OR cache Java Script library to optimize performance.

    - by Kabeer
    Hello. I am working for an intranet application. Therefore I have some control on the client machines. The Java Script library I am using is somewhat big in size. I would like to pre-install OR pre-load OR cache the Java Script library on each machine (each browser as well) so that it does not travel for each request. I know that browsers do cache a Java Script library for subsequent requests but I would like the library to be cached once so all subsequent requests, sessions and users. What is the best mechanism to achieve this?

    Read the article

  • How best to pre-install OR pre-load OR cache JavaScript library to optimize performance?

    - by Kabeer
    Hello. I am working for an intranet application. Therefore I have some control on the client machines. The JavaScript library I am using is somewhat big in size. I would like to pre-install OR pre-load OR cache the JavaScript library on each machine (each browser as well) so that it does not travel for each request. I know that browsers do cache a JavaScript library for subsequent requests but I would like the library to be cached once for all subsequent requests, sessions and users. What is the best mechanism to achieve this?

    Read the article

  • show loading gif of image only if it is really loading it for the first time

    - by Y.G.J
    i have 2 img elements. 2 id's for them: rimg and limg. limg is the loading gif and rimg is the reloaded full vertsion of the image. the is the code to show the loading before image finish to load: $("#limg").fadeIn("fast"); $("#rimg").attr("src",$(that).attr("bsrc")).load(function(){ $("#limg").fadeOut("fast",function () { $("#rimg").attr("alt",$(that).attr("alt")); $("#rimg").fadeIn("normal"); }); }); if i log into the site for the first time, it shows me the loading gif. if it is not my first time it is still showing that but i need the loading to be smooth without that loading how can i check if the image is loaded and cached before showing the loading gif?

    Read the article

  • Preloading CSS Background Images

    - by Peanuts
    Hello guys, I have a hidden contact form which is deployed clicking on a button. Its fields are set as CSS background images, and they always appears a bit later than the div that have been toggled. I was using this snippet in the <head> section, but with no luck (after I cleared the cache) : <script type="text/javascript"> $(document).ready(function() { pic = new Image(); pic2 = new Image(); pic3 = new Image(); pic.src="<?php bloginfo('template_directory'); ?>/images/inputs/input1.png"; pic2.src="<?php bloginfo('template_directory'); ?>/images/inputs/input2.png"; pic3.src="<?php bloginfo('template_directory'); ?>/images/inputs/input3.png"; }); </script> I'm using jQuery as my library, and it would be cool if I could use it as well for arranging this issue. Thanks for your thoughs.

    Read the article

  • Line by line image swing

    - by user1046017
    I want to show an image as it is downloading, I have the URL, and I am trying to get the image parts like this: InputStream openStream = url.openStream(); DataInputStream dis = new DataInputStream(new BufferedInputStream(openStream)); ByteArrayOutputStream os = new ByteArrayOutputStream(); while ((s = dis.read(b)) != -1) { os.write(b , 0, s); support.firePropertyChange("stream", null, os); } This way, any listener get the stream and creates an image, this way: if("stream".equals(evt.getPropertyName())){ try { ByteArrayOutputStream stream = (ByteArrayOutputStream) evt.getNewValue(); byte[] byteArray = stream.toByteArray(); stream.flush(); Image createImage = Toolkit.getDefaultToolkit().createImage(byteArray); this.getContentPane().add(new JLabel(new ImageIcon(createImage))); } catch (IOException ex) { Logger.getLogger(ImageTest.class.getName()).log(Level.SEVERE, null, ex); } } However, I am getting a "Premature end of JPEG file sun.awt.image.ImageFormatException: JPEG datastream contains no image" error, the image is a JPG image format, is there any library or method known to make something similar?

    Read the article

  • Load all tab bar views when application first runs

    - by codenoobie
    Here's the problem. I have a tab bar controller with 4 separate views. When I navigate from the first view to the second view, it takes some time to load up the second view. What I want to do is be able to load and initialize all of my tab bar views during my splash screen. That way, when the user navigates between the tab views, there is no wait time. So the question is... how do I manually initialize my individual tab bar views in my app delegate? And once again, thank you stackoverflow!

    Read the article

  • Pre-loading external files (CSS, JavaScript) for other pages

    - by Jason Young
    I'm curious if there is an efficient way to wait for the front page of a site to load, and then pre-load CSS and script files that I know will likely be needed for the other pages on the site. I want the front page of the site to be as fast as possible (lean and mean). It's likely that the user will not immediately click on a link. Since there will likely be some idle time, this seems like an opportune time to pre-load some of the external assets. Pre-loading should cause them to become cached. When the user does click on another page, the only request needed will be for the content and possibly some images, etc. Has anyone done this? Is it a bad idea? Is there an elegant way to implement it?

    Read the article

  • ping preload is not permitted, what could be the reason?

    - by Brogrammer
    I am trying to ping one of my local host and checking CPU process to see how "Ping of death" attack behaves. I tried to ping my other PC which is in local network with 192.168.44.2 IP Address. I tried this, ping -l 5000 192.168.44.2 and I got error like this, ping: -l flag: Operation not permitted I am on MacOSX Lion. How can I remove this flag so machine can let me ping with preload? Thanks for any direction!

    Read the article

  • How to tell a UITableView to preload all Rows?

    - by Infinite
    Is there a way to tell a UITableView to preload all rows? The tableView is supposed to show several comments (up to 80 comments). So my CommentCell uses a Setter to adapt the cell to a specific comment. -(void)setComment:(Comment *)newComment { if (newComment != comment) { [comment release]; comment = [newComment retain]; /* * set the cells view variables here */ } } This specific setter takes quite a bunch of processing resources and scrolling gets kinda laggy. I am using a comment-specific reuseIdentifier instead of a static cellIdentifier when calling dequeueReusableCellWithIdentifier: in order to assure, that "newComment" equals the old "comment". And in fact this does work great when scrolling over cells which have already been loaded. But when scrolling through the comments for the first time, it still lags like hell. Which leads me to my question: Is there a way to tell the tableview to preload all cells? (which I doubt) or Do I have to implement my own cache instead of relying on "dequeueReusableCellWithIdentifier:"?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >