Prerender/Prefetch related Questions

375 views
Skip to first unread message

Tejas Shah

unread,
Jun 1, 2011, 11:47:16 PM6/1/11
to Chromium-dev
Hi,

I was trying to test chrome's prerender/prefetch feature and I have few questions regarding this feature which is available in Dev/Canary Channel.
  • What's the difference between prefetch and prerender ?
  • What's correct way to enable this feature on a link tag ? Use rel="prerender" or rel="prefetch".
  • Is there any specific event being thrown when prerendering/prefetching is done ? Any events for error in prereder ?
  • How does this feature affect chrome extensions ? When will it inject content scripts ? when page is still invisible ?
  • Upon visiting prerender page, will it throw DOM 'page load' and other similar events ? Any change in DOM event stream ?
  • Is this feature still require command line flag before launching chrome ?

I would appreciate if someone can help me get answers to some of these questions. Any pointers would be helpful as well.

Thanks,
Tejas

Timo Burkard

unread,
Jun 2, 2011, 3:40:05 AM6/2/11
to Chromium-dev, Tejas Shah
Hi Tejas,

answers inline.

On Jun 1, 8:47 pm, Tejas Shah <teja...@chromium.org> wrote:
> Hi,
>
> I was trying to test chrome's prerender/prefetch feature and I have few
> questions regarding this feature which is available in Dev/Canary Channel.
>
>    - What's the difference between prefetch and prerender ?

prefetch is Firefox style prefetching of resources specified (just
populating the cache). In Chrome, with prerender, we don't just
download hte URL specified, but render the whole page including
running all the javascript and downloading and rendering all the
embedded resources.

>    - What's correct way to enable this feature on a link tag ? Use
>    rel="prerender" or rel="prefetch".

For builds as of Thursday of last week, link rel="prefetch" is the
correct tag (in older builds, we used link rel="prerender", but we
switched to prefech as of last week).

>    - Is there any specific event being thrown when prerendering/prefetching
>    is done ? Any events for error in prereder ?

No and No. There are a number of conditions though when we abort
prerendering, such as when an SSL page is visited, a popup appears,
and many other conditions.

>    - How does this feature affect chrome extensions ? When will it inject
>    content scripts ? when page is still invisible ?

Yes, the behavior should be identical.

>    - Upon visiting prerender page, will it throw DOM 'page load' and other
>    similar events ? Any change in DOM event stream ?

To detect on a page that it is prerendering, and to detect when the
prerendered page is shown, we are introducing the Page Visibility API
in Javascript (http://lists.w3.org/Archives/Public/public-webapps/
2011JanMar/0175.html). While this is implemented in recent builds,
there have been recent changes in what the specific keywords are. We
will publish a final updated documen with the correct terms soon, so
stay tuned for that.

>    - Is this feature still require command line flag before launching chrome
>    ?

In the current DevChannel and Canary builds, it is enabled for 80% of
users by default. By using --prerender=enabled, it will be force
enabled.

>
> I would appreciate if someone can help me get answers to some of these
> questions. Any pointers would be helpful as well.
>

You can also review our design document:
http://www.chromium.org/developers/design-documents/prerender

> Thanks,
> Tejas

Thanks.

Timo

Timo Burkard

unread,
Jun 2, 2011, 9:32:16 AM6/2/11
to Chromium-dev, Timo Burkard, Tejas Shah


On Jun 2, 12:40 am, Timo Burkard <tbur...@chromium.org> wrote:
> >    - What's correct way to enable this feature on a link tag ? Use
> >    rel="prerender" or rel="prefetch".
>
> For builds as of Thursday of last week, link rel="prefetch" is the
> correct tag (in older builds, we used link rel="prerender", but we
> switched to prefech as of last week).

Sorry, it is just reversed: rel=prerender is the new correct attribute
to be used.

Tejas Shah

unread,
Jun 2, 2011, 4:14:47 PM6/2/11
to Timo Burkard, Chromium-dev
Thank you so much Timo !

So this latest tag change i.e. rel="prerender", is already in Dev and Canary both channels ? Do we have any plans on when these Visibility APIs will be finalized and released to Canary/Dev Channel?
Reply all
Reply to author
Forward
0 new messages