Use <script> tag, instead of <link> tag
hayatoito opened this issue · 4 comments
This is a tracker to replace <link>
tag with <script>
tag in subresource loading.
Our action items would be:
- Define a syntax such as:
<script type=webbundle>
{
"source": "foo.wbn",
"scopes": ["js"],
"resources": ["css/a.css", "css/b.css"]
}
</script>
The syntax (json's scheme) should be compatible to a syntax used in BundlePreloading. We don't want to have two kinds of <script type=>
elements for a webbundle.
- Consider the semantic difference between
<link>
elements and<script>
elements, and re-consider the features which can be supported in<script>
tag.<script>
tag can have more restrictions.
Chromium is starting to prototype to use <script>
tag here (CL).
We'll share our feedback in this thread once we have more insights using <script>
tag via prototyping.
This issue is one of the blockers to ship MVP, tracked in #648.
FYI. We are starting to update the explainer. 725c28c
There are still remaining issues for <script>
-based API. Let's use this issue for further discussion.
Does this mean that the download of the bundle will start no earlier than the parsing of the HTML document, and It is impossible to use HTTP preload link headers with a description of the bundle?
That's true. That's a cons of using <script>
-based API, which is no longer able to support HTTP Header link automatically.
[Issue Triage]
It seems we can close this issue. The spec is now using <script>
tag.