관련문서 : http://zuu.kr/jank
웹폰트 관련 문서를 보다 preload에 대한 정리가 있으면 좋을 것 같아서 남긴다 :^)
Function API
1 2 3 4 5 6 7 8
| <head> ... <script id="loadcss"> // load a CSS file just before the script element containing this code loadCSS( "path/to/mystylesheet.css", document.getElementById("loadcss") ); </script> ... </head>
|
1 2
| <link rel="preload" href="path/to/mystylesheet.css" as="style" onload="this.onload=null;this.rel='stylesheet'"> <noscript><link rel="stylesheet" href="path/to/mystylesheet.css"></noscript>
|