Script and stylesheet combining
By default, each of the RadControls for ASP.NET AJAX serves a set of files (JS code and stylesheets) required for its proper client-side operation. When loading a page with several controls on it, the number of these files can become very large, often resulting in a reduced page load time and increased traffic. The reason for this is that browsers make a separate request to the server for each of these resources.
Sitefinity CMS uses the RadScriptManager and the RadStyleSheetManager to combine all resources into a single requests. It uses the RadScriptManager to combine all JavaScript resources into a single request and the RadStyleSheetManager to combine all stylesheets into another single request.
IMPORTANT: In case you are working with MVC-only pages and widgets, to combine scripts and styles for the MVC views, follow the procedure in Administration: Enable ASP.NET bundling and minification.
Script combining for frontend
You can choose to combine script resources, such as JavaScript files, for frontend pages. This way, when a page is rendered on the frontend, it requires less server calls.
By default, script combining is enabled for all frontend pages.
To turn off script combining for frontend pages, perform the following:
- Navigate to Administration » Settings » Advanced.
- In the left pane, click Pages.
- In Combine frontend script resources, enter False
- Click Save changes.
NOTE: By default, the RadScriptManager is added to all frontend pages. If you remove it, you cannot use script combining for this page. You do this by editing the page's properties, expanding Advanced options, and deselecting Include RadScriptManager.
Script combining for backend
You can choose to combine script resources, such as JavaScript files, for backend pages. This way, when a backend page is rendered, it requires less server calls.
By default, script combining is enabled for all backend pages.
To turn off script combining for backend pages, perform the following:
- Navigate to Administration » Settings » Advanced.
- In the left pane, click Pages.
- In Combine backend script resources, enter False
- Click Save changes.
NOTE: By default, the RadScriptManager is added to all backend pages. If you remove it, you cannot use script combining for this page. You do this by editing the backend page's properties, expanding Advanced options, and deselecting Include RadScriptManager.
Stylesheet combining
You can choose to combine stylesheet resources, such as CSS files. This way, when a page is rendered, it requires less server calls.
By default, stylesheet combining is enables for all pages.
To turn off stylesheet combining for pages, perform the following:
- Navigate to Administration » Settings » Advanced.
- In the left pane, click Pages.
- In Combine style sheet resources, enter False
- Click Save changes.