0

我在 HTML 页面上使用预取/预渲染。

<link rel="prefetch" href="example.com" />

我想使用 JS 延迟这个动作。

4

1 回答 1

0

Maybe try using setTimeout and document.write. Tested in chrome and it loads the site after 2s (saw in network panel)

window.setTimeout(function() {
    document.write("<link rel='prefetch' href='http://www.google.de' />")
    }
    ,2000
); 
于 2014-03-28T17:03:49.787 回答