From 013fde5f3136db077bddb44725564453ce2ba9da Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Wed, 8 Jul 2015 16:30:54 -0700 Subject: [PATCH 1/2] replace "as" attribute with "type" For background, see: https://github.com/whatwg/fetch/issues/64#issuecomment-115700995 - type is an advisory attribute on link - type must contain valid mime type - context of the fetch is "preload" --- index.html | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/index.html b/index.html index 7cf8584..980e4a8 100644 --- a/index.html +++ b/index.html @@ -70,21 +70,19 @@

Preload

 <!-- preload a widget component -->
-<link rel="preload" href="/components/widget.html" as="iframe">
+<link rel="preload" href="/components/widget.html" type="text/html">
 
 <!-- preload an application script -->
-<link rel="preload" href="/app/script.js" as="javascript">
+<link rel="preload" href="/app/script.js" type="text/javascript">
 
 <!-- preload a CSS stylesheet -->
-<link rel="preload" href="/style/style.css" as="stylesheet">
+<link rel="preload" href="/style/style.css" type="text/css">
 
 <!-- preload an image asset -->
-<link rel="preload" href="//example.com/image.jpg" as="image" media="screen and (max-width: 640px)">
+<link rel="preload" href="//example.com/image.jpg" type="image/jpeg" media="screen and (max-width: 640px)" crossorigin>