0

There are a lot of answers how to preload assets with JS - in parallel or consecutive modes, with AJAX or JS objects, etc. But most of them put pressure on a current connection: if a site has other assets like visible images this approach could have negative impact on site loading.

Is there JS API that implements the same Link prefetching features link tag/header has? To load assets in the moments when a connection is idle, to stop and to restart them. The thing that seems possible to be utilized for these needs is TCPSocket but it is Firefox OS only.

Example: I have 2 types of galleries. The 1st one - Gallery A - with previews of images and the 2nd one - Gallery B - with full-size versions for the same images. While a user is viewing the previews I'm doing standard preloading of the previews for Gallery A. And also I want to add the full-size images from Gallery B to the prefetching queue.

origaminal
  • 2,065
  • 1
  • 11
  • 19
  • Could also load all images within a `template` , display larger full-size images from within same document, without making additional requests to server ? Or, load full-size images, resize full-size images within same document to display as previews, display full-size images at user action ? This approach would load only full-size images once, without requesting duplicates of same images from server ? – guest271314 Jan 25 '16 at 00:30
  • There's no way in the world I would visit a site that did this, once I found out. My data cap is precious to me. I'm sure it is to many other people as well. – Sam Axe Jan 25 '16 at 00:31

0 Answers0