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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   858 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, 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.