Added async option to headscript fix
Last updated on 24 September, 2021
1 min read
What was the issue?
The issue was that loading frontend scripts using headScript templating helper asynchronously wasn’t possible.
How did you solve it?
I’ve solved it by adding an additional option for headScript which when rendering script tag will add async attribute if it’s passed when requesting for a script.
Why is this fix important?
It is good to have this option in case we have larger scripts and the time of their execution is not important. This way, we won’t increase initial page load time during HTML parsing and execution of other more important scripts.
How does it feel to contribute to a platform such as Pimcore?
It feels good to contribute to Pimcore knowing that your change might help someone and in the end help Pimcore become a better and more reliable platform.
And if you want to check out this pull request, just follow the link!
This guide is part of the category, read more on
Looking for Exponential Growth? Let’s Get Started.