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


Reply


2 Posts   572 Views

Avatar
bunheng

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.

Thanks
Bunheng

Avatar
Willr

Forum Moderator, 5513 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.