prerender only works in current tab?

194 views
Skip to first unread message

飘零

unread,
Jul 21, 2015, 5:14:02 AM7/21/15
to prer...@chromium.org
<link rel="prerender" href="https://www.google.com.sg/webhp?hl=zh-CN"> <a href="https://www.google.com.sg/webhp?hl=zh-CN">google</a> it works well if open the link with a new tab <link rel="prerender" href="https://www.google.com.sg/webhp?hl=zh-CN"> <a href="https://www.google.com.sg/webhp?hl=zh-CN" target="_blank">google</a> it can't work.

why prerender only works in current tab?

piaoling

unread,
Jul 21, 2015, 5:47:11 AM7/21/15
to prer...@chromium.org
It seems that IE11 works well even when open the link with a new tab.

在 2015年7月21日星期二 UTC+8下午5:14:02,piaoling写道:

Matt Menke

unread,
Jul 21, 2015, 8:02:29 AM7/21/15
to piaoling, Prerender
sessionStorage is scoped per-tab.

There are a bunch of ways we could have resolved that problem, all with subtle bad behavior in some cases.  We opted to have the prerender and the original tab share session storage, and not allow use of a prerender in other tabs.  You can still get somewhat funky session storage behaviors if you really try.

I'm not sure what option IE opted for, but you can undoubtedly get different subtly broken behaviors with their implementation of prerender + session storage if you try.  The two features just aren't compatible.

piaoling

unread,
Jul 21, 2015, 10:03:50 PM7/21/15
to Prerender
Thank you for your answer.

在 2015年7月21日星期二 UTC+8下午8:02:29,Matt Menke写道:

piaoling

unread,
Aug 2, 2015, 4:05:10 AM8/2/15
to Prerender, piao...@gmail.com
Our website has a lot of cases have to open a new tab page, maybe could add a option (maybe named  crosstab, the default value is false) to support cross tab prerender when the website developer know exactly  they don't use sessionStorage? 
maybe like this:
<link rel='prerender' crosstab=true href='xxx.html'>


在 2015年7月21日星期二 UTC+8下午8:02:29,Matt Menke写道:
sessionStorage is scoped per-tab.

Reply all
Reply to author
Forward
0 new messages