Question

I couldn't find the answer to this particular question on Stack Overflow. Not particularly looking for an implementation (unless it happens to exist already), but ...

Say I have an intranet application, which loads very quickly. This has links to a number of external sites, all of which we can assume load very slowly. The user will definitely visit all of the links on the page, and will definitely not do that straight away (we don't know, but it's unlikely they'll open a link within the first ten seconds of the page loading).

I would like to start these external links downloading, without opening a new window/tab, before they've clicked on a link? I've noticed http://instantclick.io/ has such an ability, but specifically warns against loading external sites (or rather, sites with different CSS/JS files)

Anyhoo, is it possible to start caching an external site with JS (or anything else for that matter)? Would it be possible, say, to preload the HTML page but not any associated CSS/JS files to fit the problem instantclick.io mentions? Even if it's one element of an external site that could be pre-emptively downloaded, that would be a useful gain ...

Was it helpful?

Solution

load all the external files in iframes i.e.

<div style="display:none;">
<iframe name="i2" src="www.xyz.com"></iframe>
<iframe name="i3" src="www.xyzsf.com"></iframe>
<iframe name="i1" src="www.xysfz.com"></iframe>
...
</div>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top