• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Can I add js files in templates async?

rhodes

Active member
#1
Hello,

I've built some custom templates including javascript source files

<xen:require js="/community/js/myfile.js" />

The result is sth. like this
<script src="/community/js/myfile.js"></script>

However, concerning loading performance and SEO this would be better
<script async src="/community/js/myfile.js"></script>

Is it possible to add "async" parameter to my js file?