Note that there are some explanatory texts on larger screens.

plurals
  1. POHttp Header Range (HTML + Java Example)
    primarykey
    data
    text
    <p>I have a requirement to load big images into chrome browser, in pieces from the server and after it finishes downloading the file completely, if the user wants to look at the file again, then the browser should load it from its cache.</p> <p>I have done the following to achieve this:</p> <ol> <li>I have written a HTML file and I will be displaying the big image using '<strong>img</strong>' tag.</li> <li>Whenever the user requests for the image file, I'll make a HEAD request to the server enquiring about the content-length and last-modified-date.</li> <li>The server replies back with the information based on the request and I divide the size of the file into 10 pieces and then make 10 sequential requests to fetch the image file. (Using for loop).</li> <li>After chrome downloads the entire file and the next time user wants to look at the file, then I am making chrome to send If-Modified-Since query to the server.</li> <li>If the server responds back with the code 304, then chrome will understand that it has to fetch the file from its cache.</li> </ol> <p>I am facing the following problems: 1. I am getting about 100 bytes per response. Where should I store it and how should I make my img tag understand that it the client is still downloading the file.3 2. How should I recognize the file from the pool of files present in chrome's cache ? 3. The next time someone comes to view the same image, from where should I display the content from ?</p> <p>Please Help. Can anyone also provide me with some example code or a link to some sample code.</p> <p>Thanks and Regards, Akshay Sahu</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload