3 Replies Latest reply on Jan 27, 2014 10:18 AM by Marcus Atkins

    What is the best practice for including view specific javascript?

    Marcus Atkins

      I have views of which have their own javascript; this javascript being only relevant to that view.

       

      I have a layout that is shared by a decent amount of views, and do not want to load every view specific javascript file for performance reasons.

       

      Currently all I am doing is adding external style sheets to the end of the view. However I know this is not best practice as the javascript ends up in the body instead of the head.

       

      Many thanks,

      Marcus Atkins