sergei-maertens / django-systemjs

MIT License
42 stars 5 forks source link

could use `async` in <script> tag #21

Closed pcompassion closed 8 years ago

pcompassion commented 8 years ago

I think most browsers support it.

sergei-maertens commented 8 years ago

https://css-tricks.com/async-attribute-scripts-bottom/ - what's keeping you from adding it to the bottom of your page?

pcompassion commented 8 years ago

didn't know it was the same thing. I already have them at the bottom. I'm having an issue where the same page loads sometimes fast, sometimes slow. Just thought it might help.

closing.

sergei-maertens commented 8 years ago

Okay

On Sep 6, 2016 04:08, "pcompassion" notifications@github.com wrote:

Closed #21 https://github.com/sergei-maertens/django-systemjs/issues/21.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sergei-maertens/django-systemjs/issues/21#event-778757036, or mute the thread https://github.com/notifications/unsubscribe-auth/AFQ01qT77qsDEb1Ze7Mzhi_xKc7L32Fzks5qnMsagaJpZM4J09k0 .

pcompassion commented 8 years ago

Hello @sergei-maertens

I've been hunting down the random slowness.

I found putting code at the bottom still blocks rendering at least in my android chrome.
I find commenting the scripts at the bottom of body (about 5 of them) speeds up the perceived page speed.

Hence I could use async and defer on script tag.

sergei-maertens commented 8 years ago

Okay, I'll add the option to specify tag attributes to the template tag - that way you have all freedom and flexibility you need!

sergei-maertens commented 8 years ago

@pcompassion - should be released in a few hours during my break, PR here: https://github.com/sergei-maertens/django-systemjs/pull/25. See https://github.com/sergei-maertens/django-systemjs/commit/7723e3ac9e56c9b64fccb9f76ef3a375e323e3b0 for usage

sergei-maertens commented 8 years ago

@pcompassion 1.4.1 is available on PyPI