Search code examples
javascriptgoogle-chromegoogle-chrome-extensionprerender

prerendering HTTPS optional site


Prerender does not work on https sites. I want to prerender a google scholar page. These display just fine over http unless the client is logged into google, in which case the server (seems to) reroute to https.

Is there any solution?

only interested in chrome and working to code an extension.

Also, if PreRender fails because it's https, will it still do the ssl handshake and dns lookup ahead of time? Or just I code that separately?


Solution

  • Prerender works on https since 2011 (source code).

    However, according to the feature design documentation:

    If the server sends a redirect response for a subresource with a "Follow-Only-When-Prerender-Shown: 1" header, Chrome will hold off on following the redirect and on fetching the respective subresource until the prerender is shown to the user.

    It means that in case a page is empty and just redirects to another url, this empty page is prerendered.