Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Javascript Load and Performance


2 Posts   501 Views


30 August 2011 at 2:39pm Community Member, 78 Posts

Good Morning,

I am using combine file to combine all my Javascript file, it was working fine if I write requirement javascript file to header instead of body, the true thing is I want to write all Javascript and combined javascript to body. I would like to know if there is away to load Javascript before page loaded.



30 August 2011 at 2:55pm Forum Moderator, 5511 Posts

Requirements would automatically write any JS to the bottom of your body unless you have a <script> tag in your header or you turn off Requirements::set_write_to_body(). Have you got any <script> tags in your header.