rel-preload

リンク型 preload (HTML)

仕様書

リンク型 preload

[26] リンク型 preload は、 指定された資源利用者が必要とする可能性が高く、 予めこれを fetch してキャッシュしなければならないことを示します >>25

[27] リンク型 preload は、 link 要素で指定でき、外部資源リンクを作成します >>25

[28] このリンク型body-ok です >>25。つまりこのリンク型link 要素は、 head 要素内のみならず、 body 要素内でも使えます。

実装

[36] Chromeload からしばらくしてまだ preload した資源が未使用のままなら、これを開発者コンソールに報告します。

歴史

[6] Resource Hints ( ( 版)) https://igrigorik.github.io/resource-hints/#preload

[7] [whatwg] Preloading and deferred loading of scripts and other resources ( (Ian Hickson 著, 版)) http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Aug/0177.html

[8] Resource Hints ( ( 版)) http://www.w3.org/TR/2014/WD-resource-hints-20141021/

[1] w3c/preload ( 版) https://github.com/w3c/preload

[2] Preload ( 版) https://w3c.github.io/preload/

[3] Add preload/prerender. Still need CSP alignment. See #36 · whatwg/fetch@26e5cca ( 版) https://github.com/whatwg/fetch/commit/26e5cca8ab5bb4b68a8f238f41dd7364d8c276b3

[4] Resource Hints ( 版) http://www.w3.org/TR/2015/WD-resource-hints-20150422/

[5] Resource Hints ( 版) http://www.w3.org/TR/2015/WD-resource-hints-20150423/

[9] Issue 310450 - chromium - The default <video> preload value should be "metadata" - An open-source project to help move the web forward. - Google Project Hosting ( 版) https://code.google.com/p/chromium/issues/detail?id=310450

[10] whatwg@whatwg.org from July 2015 by thread ( 版) https://lists.w3.org/Archives/Public/public-whatwg-archive/2015Jul/thread.html

[11] Preload ( ( 版)) http://www.w3.org/TR/2015/WD-preload-20150721/

[12] Preload ( 版) http://www.w3.org/TR/2015/WD-preload-20150723/

[13] Preload ( 版) http://www.w3.org/TR/2015/WD-preload-20150724/

[14] IRC logs: freenode / #whatwg / 20150821 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20150821

[15] Suggest an invalid value default for preload attr · whatwg/html@651ea99 ( 版) https://github.com/whatwg/html/commit/651ea9976f8506b216851d9f52e11803fbe988e8

[16] Preload ( 版) http://www.w3.org/TR/2015/WD-preload-20150901/

[17] Revert "Suggest an invalid value default for preload attr" · whatwg/html@0a5aea3 ( 版) https://github.com/whatwg/html/commit/0a5aea3590336e260ffd8d35de84425360095520

[18] Preload ( 版) https://w3c.github.io/preload/

[19] Preload ( 版) https://www.w3.org/TR/2016/WD-preload-20160113/

[20] Merge pull request #42 from dret/patch-1 · w3c/preload@7bcdad7 ( 版) https://github.com/w3c/preload/commit/7bcdad7b093be1d5757fefe73e1facbb2a881e86

[21] Incorporating registration request feedback · w3c/preload@f848767 ( 版) https://github.com/w3c/preload/commit/f848767e3fbf7c53aa5a9aec663dd74e93bdafe3

[22] Preload ( 版) https://www.w3.org/TR/2016/WD-preload-20160120/

[23] Announcing Support for HTTP/2 Server Push ( 版) https://blog.cloudflare.com/announcing-support-for-http-2-server-push-2/

So, if you want to push assets for a given request, you simply add a specially formatted Link header to the response:

Link: </asset/to/push.js>; rel=preload;

[24] Announcing Support for HTTP/2 Server Push ( 版) https://blog.cloudflare.com/announcing-support-for-http-2-server-push-2/

The Link header was originally designed to let browsers know that they should preload an asset. If you still need this behavior for legacy reasons, you can append the nopush directive to the header, like so:

Link: </dont/want/to/push/this.css>; rel=preload; as=stylesheet; nopush

[29] Add the "preload" link type ( (yoavweiss著, )) https://github.com/whatwg/html/commit/d013cd1c329162270a219f450b88aa0dbea9d9bb

[30] Bug 158720 – Add support for <link rel=preload> ( ()) https://bugs.webkit.org/show_bug.cgi?id=158720

[31] 1222633 – Add support for <link rel=preload> ( ()) https://bugzilla.mozilla.org/show_bug.cgi?id=1222633

[32] The status of Preload in Microsoft Edge is Under Consideration - Microsoft Edge Development ( ()) https://developer.microsoft.com/en-us/microsoft-edge/platform/status/preload

Roadmap Priority: Medium — Development is likely for a future release.

[34] GoogleChrome/http2-push-manifest: Generate a list of static resources for http2 push. ( ()) https://github.com/GoogleChrome/http2-push-manifest

Generates a list of local static resources used in your web app by outputting a json file. This file can be read by your web server to more easily construct the appropriate Link: <URL>; rel=preload; as=<TYPE> headers(s) for http2 push/preload.

[35] Preload () https://www.w3.org/TR/2016/WD-preload-20161130/

[37] Fix up `type`,`media` and `href` processing (#87) (yoavweiss著, ) https://github.com/w3c/preload/commit/300b0e7d656dcb611a95c3c4f4bb7545fcc7fca7

[38] Align with w3c/hr-time#47 (plehegar著, ) https://github.com/w3c/preload/commit/39acc002ccb2be1a19c214b0e26ce46f5038edc0

[39] filamentgroup/loadCSS: A function for loading CSS asynchronously () https://github.com/filamentgroup/loadCSS

LoadCSS is designed for loading CSS that is not critical to the initial rendering of the page, and desirable to load in an asynchronous manner. (For the critical CSS rules, we recommend either inlining that CSS in a style element, or referencing it externally and server-pushing it using http/2. Read more here)

The standard markup pattern for loading files asynchronously is: <link rel="preload"> (W3C Spec). We recommend using this markup pattern to reference your non-critical CSS files. loadCSS and its rel=preload polyfill are designed to enable this markup to work in browsers that don't yet support this feature.

[40] WebPerf Weekly Call -- 31 May 2017 () https://www.w3.org/2017/05/31-webperf-minutes.html

[41] Update <link>'s processing model to work well for preload (domenic著, ) https://github.com/whatwg/html/commit/eb5d1cc61cdfe7d946618cc39a1f7c3e5904a03b

[42] Merge pull request #91 from domenic/fix-attribute-definition (yoavweiss著, ) https://github.com/w3c/preload/commit/01d2c0c7c44ee6340e4af179c9f3387f3d8a092f

[43] Add crossorigin attribute for as=fetch examples (yutakahirano著, ) https://github.com/w3c/preload/commit/bb9d49293f99b1c7ff6411e5ae37235cbade943c

[44] Add crossorigin attribute for as=fetch examples by yutakahirano · Pull Request #102 · w3c/preload () https://github.com/w3c/preload/pull/102

[45] Matching preload with different crossorigin attribute · Issue #100 · w3c/preload () https://github.com/w3c/preload/issues/100

[46] [Question]In browser console, why request resource which is marked 'preload' in the html won't work? · Issue #2853 · whatwg/html () https://github.com/whatwg/html/issues/2853

[47] filamentgroup/loadCSS: A function for loading CSS asynchronously () https://github.com/filamentgroup/loadCSS

[48] Using preload for "async" CSS by changing `rel` trick (Royi Hagigi著, ) https://lists.w3.org/Archives/Public/public-web-perf/2018Jan/0002.html

[49] Audio/Video Updates in Chrome 63/64  |  Web  |  Google Developers () https://developers.google.com/web/updates/2017/12/chrome-63-64-media-updates

[50] New in Chrome 64  |  Web  |  Google Developers () https://developers.google.com/web/updates/2018/01/nic64

[51] preload, destinations, and module scripts · Issue #486 · whatwg/fetch () https://github.com/whatwg/fetch/issues/486

[52] Add <link> rel="modulepreload" by domenic · Pull Request #2383 · whatwg/html () https://github.com/whatwg/html/pull/2383

[53] Preload () https://www.w3.org/TR/2017/CR-preload-20171026/

[54] Request.destination for `<link rel=prefetch>` · Issue #658 · whatwg/fetch () https://github.com/whatwg/fetch/issues/658

[55] W3C/WHATWG Relationship update (, ) https://www.w3.org/2021/06/WHATWG-W3C-MOU_2021_update.html

[56] Moving Preload · Issue #7 · w3c/whatwg-coord () https://github.com/w3c/whatwg-coord/issues/7