SS loads a bunch of JS files at the end of my pages (Prototype, behaviour.js, i18n.js ...).
But I really don't need them on my page. It just cranks up download time for users. Where do I fix that?
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
SS loads a bunch of JS files at the end of my pages (Prototype, behaviour.js, i18n.js ...).
But I really don't need them on my page. It just cranks up download time for users. Where do I fix that?
In Page_Controller I use this for excluding prototype and thirdparty scripts, like userforms
public function init() {
parent::init();
Requirements::block('sapphire/thirdparty/jquery/jquery.js');
Requirements::block('userforms/thirdparty/jquery-validate/jquery.validate.min.js');
Validator::set_javascript_validation_handler('none');
}
patte, thanks for your help. You saved my users a lot of traffic :)
The search field wants to load lost of validation js. You can kill those in your _config file with the following line:
Validator::set_javascript_validation_handler('none');