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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

Javascript Load and Performance

Go to End

2 Posts   813 Views


Community Member, 78 Posts

30 August 2011 at 2:39pm

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.



Forum Moderator, 5523 Posts

30 August 2011 at 2:55pm

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.