/
616.txt
93 lines (69 loc) · 5.21 KB
/
616.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
* 仕様書
[REFS[
- [22] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-06-10 18:36:00 +09:00]]) <https://html.spec.whatwg.org/#link-type-prerender>
- [16] [CITE@en[Page Visibility (Second Edition)]] ([TIME[2015-11-13 18:23:52 +09:00]] 版) <https://w3c.github.io/page-visibility/#idl-def-.prerender>
- [5] [CITE@en[Page Visibility]] ([TIME[2013-05-20 14:28:58 +09:00]] 版) <https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#pv-prerender>
- [18] [CITE@en[Page Visibility (Second Edition)]] ([TIME[2015-11-13 18:23:52 +09:00]] 版) <https://w3c.github.io/page-visibility/#h-visibilitystate-attribute>
]REFS]
* リンク型 [CODE(HTML)@en[prerender]]
[25] [[リンク型]] [DFN[[CODE(HTML)@en[prerender]]]] は、
指定された[[資源]]が次の [[navigate]] で必要となるかもしれず、
予め [[fetch]] およびその先の処理 ([[部分資源]]の [[fetch]]
や[[レンダリング]]の一部の実施) が有用と思われることを示します [SRC[>>22]]。
[23] [[リンク型]] [CODE(HTML)@en[prerender]] は、 [CODE(HTMLe)@en[link]]
[[要素]]で指定でき、[[外部資源リンク]]を作成します [SRC[>>22]]。
[24] この[[リンク型]]は [[body-ok]] です [SRC[>>22]]。つまりこの[[リンク型]]の
[CODE(HTMLe)@en[link]] [[要素]]は、 [CODE(HTMLe)@en[head]] [[要素]]内のみならず、
[CODE(HTMLe)@en[body]] [[要素]]内でも使えます。
* [CODE(DOMa)@en[visibilityState]] 属性の値 [CODE(DOM)@en[prerender]] (DOM)
[6] [CODE(DOMi)@en[[[Document]]]] [[オブジェクト]]の [CODE(DOMa)@en[[[visibilityState]]]]
[[属性]]は、[[最上位閲覧文脈]]に含まれている [CODE(DOMi)@en[[[Document]]]] が画面外で読み込まれていて表示されていない時は、
[DFN[[CODE(DOM)@en[[[prerender]]]]]] を返して[['''構いません''']]。 [SRC[>>5]]
;; [7] ただし [CODE(DOM)@en[[[prerender]]]] という値には対応しなくても構わない [SRC[>>5]] とされています。
;; [8] [CODE(JS)@en[[[document.hidden]]]] は[[偽]]になります。
[17] [[文書]]の[F[[[可視性状態]]]]の値[DFN[[RUBYB[事前レンダリング]@en[prerender]]]]は、
[[文書]]が[[事前レンダリング]]のため読み込まれ、まだ可視状態になっていないことを表します
[SRC[>>16]]。
[19] [[文書]]は、[[事前レンダリング]]された時、[F[[[可視性状態]]]]が[[事前レンダリング]]に設定されます
[SRC[>>18]]。一旦[[可視]]状態に遷移すると、再び[[事前レンダリング]]に戻ることはありません。
;; [CODE[[[visibilitychange]]]] も参照。
* 歴史
[REFS[
-[1] [CITE@en[Web Developer's Guide to Prerendering in Chrome - Google Chrome — Google Developers]]
( ([TIME[2012-03-31 07:53:52 +09:00]] 版))
<https://developers.google.com/chrome/whitepapers/prerender>
-[2] [CITE[''''''[''''''whatwg'''''']'''''' Prerendering and APIs]]
( ([TIME[2012-04-10 21:01:06 +09:00]] 版))
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-April/035394.html>
-[3] [CITE[''''''[''''''whatwg'''''']'''''' Proposal: Link prerender events]]
( ([TIME[2012-11-08 01:11:26 +09:00]] 版))
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-November/037833.html>
-[4] [CITE[''''''[''''''whatwg'''''']'''''' Prerendering and APIs]]
( ([TIME[2012-04-10 21:00:55 +09:00]] 版))
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-March/035065.html>
]REFS]
[9] [CITE@en[Web Developer's Guide to Prerendering in Chrome - Google Chrome — Google Developers]]
( ([TIME[2012-03-30 22:53:52 +09:00]] 版))
<https://developers.google.com/chrome/whitepapers/prerender?hl=ja>
[10] [CITE@en[Resource Hints]]
( ([TIME[2014-08-05 22:14:16 +09:00]] 版))
<https://igrigorik.github.io/resource-hints/#prerender>
[11] [CITE@en[Add preload/prerender. Still need CSP alignment. See #36 · whatwg/fetch@26e5cca]]
([TIME[2015-04-05 18:50:23 +09:00]] 版)
<https://github.com/whatwg/fetch/commit/26e5cca8ab5bb4b68a8f238f41dd7364d8c276b3>
[12] [CITE@en[Add "prerender" as navigation request context per https://github.com/w3c... · whatwg/fetch@04f7c75]]
([TIME[2015-05-05 11:35:34 +09:00]] 版)
<https://github.com/whatwg/fetch/commit/04f7c7560fdd1d7f09cd1aa62b94794e1cd094a8>
[13] [CITE@ja[プリレンダリングとプリフェッチのサポート (Windows)]]
([TIME[2015-05-07 17:14:06 +09:00]] 版)
<https://msdn.microsoft.com/library/dn265039(v=vs.85).aspx>
[14] [CITE@en[22676 – APIs for page prerendering]]
([TIME[2015-09-17 14:47:09 +09:00]] 版)
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=22676>
[15] [CITE@en[cleanup visibilityState conditions · w3c/page-visibility@cd72018]] ([TIME[2015-11-13 23:46:11 +09:00]] 版) <https://github.com/w3c/page-visibility/commit/cd7201817c3f2115e7a4ef8e05fbca01e5e91103>
[20] [CITE@en[Link relations: add dns-prefetch/preconnect/prerender; update prefetch]]
( ([[domenic]]著, [TIME[2016-04-28 07:26:36 +09:00]]))
<https://github.com/whatwg/html/commit/0f54b54307647ca15ace16ef03c570db1b918193>
[21] [CITE@en[Treat <link rel="next"> as a general resource hint]]
( ([[domenic]]著, [TIME[2016-05-19 16:38:13 +09:00]]))
<https://github.com/whatwg/html/commit/7ff5b096d423bf5750463957aed69680368ed99e>