Performance can be an important factor when building a website for your organisation. It affects the experience of your visitors and your ranking in search engines. Performance also has a potential impact on the budget supporting your site’s infrastructure and development.
In Contensis R8.3, we’ve added a setting against the CMS config of a publishing server to switch the ScriptManager off. Some of our controls however will still force the ScriptManager on on pages that they are included in because it is needed for their operation, also you may find that your own bespoke controls will not work with ScriptManager turned off, so it’s essential this change is tested on your preview servers before switching your live servers.
Script Manager Enabled
Script Manager Disabled
Configuring the publishing server
Any publishing server setup before R8.3 will have the ScriptManager enabled. We’ve disabled it by default for any publishing server setup after upgrading to R8.3.
- Go to the Management Console
- Select Project Setup
- Select Publishing Servers
- Locate your test server and Select CMS Config
- The CMS Config will open in a Code Editor window
- Find the key named Contensis_RenderScriptManager
- Set the value to False
- Press Save & Publish
- The CMS Config will be published removing the ScriptManager from any rendered page.
Note: When making any change to your published website, we recommend updating your test server before any live production servers.
Having updated your preview server – and confirmed that your site is working as expected – follow the procedure for any live servers.
Configure pages and controls
You may decide to set script manager rendering on or off across your server, however you may have certain pages you want to override the default, e.g. if you have some controls, that depend upon it.
In this situation, we have provided a property that can be set before the Page Init event (this is due to a Microsoft .NET limitation), if you try to set it too late, you’ll get an InvalidOperationException. This property allows you to override the server default for that page.
This must be in a Control Init event, and added to the page before the page load event:
Me.ParentPage.RenderScriptManager = True
This must be in a Page PreInit event:
Me.RenderScriptManager = True