1. 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?

Discussion in 'XenForo Questions and Support' started by rhodes, Jun 29, 2015.

  1. rhodes

    rhodes Active Member

    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?
     
  2. Mike

    Mike XenForo Developer Staff Member

    If you're doing it through xen:require tags, it would require custom development.
     

Share This Page