Skip to content

2.0.1

Compare
Choose a tag to compare
@optimalisatie optimalisatie released this 11 Oct 20:02
· 2 commits to master since this release
  • bugfix: compressed javascript object not loaded {"5":"/js/script.js"}
  • added: async critical.css via data-x attribute.
  • changed: default CSS source methods changed to xhr, cors (cssText as preferred method was removed)
  • changed: stylesheet/script insert target now starts after the async-iife.js script element and after the optional async critical.css element.

Async critical.css

A new innovation now makes it possible to load critical CSS asynchronously using the data-x attribute.

<script async src="js/async-iife.js" data-x="/path/to/critical.css" data-c='[["css/sheet1.css","js/script.js",{"4":"https://cdn.com/css/sheet2.css"},{"5":"https://cdn.com/js/script2.js","16":"x","48":54},{"5":"js/script3.js","15":"x"}],{"49":52,"60":{"2":53,"57":1000}}]'></script>