To Chrome development team,
We're a social networking website (www.empowr.com) and use the prerendering feature in Chrome <https://www.chromium.org/developers/design-documents/prerender> to prepare another page of work in the background while the user finishes working on the current page, which can take from 30 seconds to a few minutes per page and can trigger a couple AJAX requests and temporary pop-up browser windows before the user advances to the next page. This parallelizes the work done by the user and by the browser so that the user spends minimal time waiting for the network.
(1) Our use case of prerendering the next page of work for a user actively using the browser tab despite activity in other tab is being considered as part of the feature design. We have gotten reports that prerendering works more reliably when other tabs are closed, and we feel that shouldn’t influence the behavior of the currently active tab.
(2) We are looking for guidance that we can tell users when prerendering is failing. This guidance can be prewritten or can be prompted by automated heuristics that we add to the site using JavaScript. In particular, these final prerendering statuses in https://src.chromium.org/svn/trunk/src/chrome/browser/prerender/prerender_manager.cc are ones we don’t have recommendations for our users, and we’re wondering what our guidance should be:
FINAL_STATUS_NON_EMPTY_BROWSING_INSTANCE
FINAL_STATUS_NAVIGATION_UNCOMMITTED
FINAL_STATUS_PAGE_BEING_CAPTURED
FINAL_STATUS_CANCELLED
FINAL_STATUS_WINDOW_OPENER
FINAL_STATUS_WOULD_HAVE_BEEN_USED
Any guidance you could provide us would be greatly appreciated.
Best,
Brian Woosley
Executive Vice President
Matt,
Thank you for the quick response!
We're interested in detecting when prerendering has completed loading the next page. The prerender test site <http://prerender-test.appspot.com/>
uses a StorageEvent to indicate when the prerendered page is ready, but when we implemented this strategy, the event doesn't fire in Chrome (but it does in Internet Explorer). We've verified that the event handler is connected before the prerendered page
signals localStorage.
Our particular implementation has the LINK element declared statically in the page HTML, and the prerendered URL redirects (HTTP status code 302) to the intended page. All pages are on the same domain.
(1) Is the localStorage mechanism intended to work? The Web Storage specification says the event is only supposed to fire on windows other than the current window, and prerendered pages might be
considered to be hosted in the same window. Also, the explanation for FINAL_STATUS_NON_EMPTY_BROWSING_INSTANCE suggests that the prerendered page is not meant to be able to communicate with other windows.
(2) Are there alternative mechanisms that we can use to detect the readiness of the prerendered page?
Best,
Brian