Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Replace loadpolicy with prefetch & prerender - #27

Closed
igrigorik wants to merge 6 commits into
gh-pagesfrom
prefetch-prerender
Closed

igrigorik wants to merge 6 commits into
gh-pagesfrom
prefetch-prerender

Conversation

@igrigorik

Copy link
Copy Markdown
Member

Preview: https://rawgit.com/w3c/resource-hints/prefetch-prerender/index.html

  • removed loadpolicy attribute
  • loadpolicy=next -> prerender
  • loadpolicy=next inert -> prefetch

TODO's and open questions:

  • Define as attribute on prefetch
  • Define as on prerender? Or, should we keep it scoped to HTML documents?

- removed loadpolicy attribute
- loadpolicy=next -> prerender
- loadpolicy=next inert -> prefetch
Comment thread index.html

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add the above paragraphs (or something similar) to the new "prefetch" section?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is there, see line 233 in updated file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, totally missed it

@yoavweiss

Copy link
Copy Markdown
Contributor

LGTM

@igrigorik

Copy link
Copy Markdown
Member Author

Any opinions / suggestions on prerender + as?

Practically speaking, today nothing stops someone from specifying a non-HTML resource via <link rel=prerender>, it's just that existing UA's that support page prerendering won't do anything with the response. So, in effect, such a fetch is basically equivalent to <link rel=prefetch>.

In the spirit of keeping things simple, I propose we omit "as" on prerender and implicitly restrict it to HTML and page prerendering use cases. Nothing stops us from expanding this functionality in the future by adding as support.

Thoughts?

@yoavweiss

Copy link
Copy Markdown
Contributor

Sounds good as long as the UA is free to preprocess other types of resources (without triggering extra requests or any other side effects)

We can expand the scope to non-HTML resources, if needed, in the future.
As such, current definition specifies the currently implemented behavior
in Chrome and IE.
- 'as' must be optional to be backwards compatible
- 'as' is defined in Preload, link there to avoid duplication
@igrigorik

Copy link
Copy Markdown
Member Author
  • I've constrained prerender to HTML only.
  • I've made as optional on prefetch and linked it's processing/definition to Preload. (Note: it must me optional to be backwards compatible).

As such, I believe this should be good to merge now.. Assuming I get an LGTM :-)

/cc @yoavweiss @toddreifsteck @plehegar @marcoscaceres

@igrigorik igrigorik changed the title (WIP) Replace loadpolicy with prefetch & prerender Replace loadpolicy with prefetch & prerender Apr 29, 2015
Comment thread index.html Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add network "cost" to the list?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, see 7617c67.

@toddreifsteck

Copy link
Copy Markdown
Member

Flagging for review

@toddreifsteck

Copy link
Copy Markdown
Member

Ok.. after a quick review, this looks good to merge. Will review in detail with sub-team that has previously implemented IE's prefetch/prerender logic and come back with any additional notes in future.

@yoavweiss

Copy link
Copy Markdown
Contributor

LGTM

@igrigorik

Copy link
Copy Markdown
Member Author

Merged in d33f603.

@igrigorik igrigorik closed this Apr 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants