<link rel="stylesheet" href="/path/to/my.css" media="print" onload="this.media='all'">
In the link’s media attribute is set to print
. Print is a media type which will apply to the print based media or when user tries to print the page. By applyinhg this the CSS will load Asynchronosuly. But we need to apply the style to the page also, for that we can use the onload
attribute to set the link’s media to all when it finishes loading.
Use the share button below if you liked it.
It makes me smile, when I see it.