How I do async CSS: <link rel="stylesheet" href="..." media="none" onload="if(http://this.media !=='all')http://this.media ='all'">`
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@mathias@keithclarkcouk@kkotowicz Great! But it doesn’t work in older WebKits like Android 4.3. Is there a workaround for them? -
@ausi@mathias@kkotowicz looking into that. Short term, you can call `onload()` with JS for each async `<link>` - 4 more replies
New conversation -
-
-
@mathias@keithclarkcouk@kkotowicz Shorter: <link rel="stylesheet" href="foo.css" media="none" onload="media='all'"> What’s that `if` for? -
@g16n@mathias@kkotowicz if you drop the `if`, you'll crash Firefox.
End of conversation
New conversation -
-
-
@mathias@keithclarkcouk@kkotowicz why need if(media) check? <link rel="stylesheet" href="foo.css" media="none" onload="media='all'">Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.