Script optimization when using Bootstrap, MVC and a custom WebForms based widget
We're trying to achieve optimal performance with regards to both CSS and JS under the following circumstances:
I can see Script references created under Administration > Advanced > Pages > Script Manager > Script References.
In our custom WebForms based widget we're adding widget specific JS files using a ScriptManagerProxy Asp.net WebForms control with Composite Scripts.
Looking at our main template in the Bootstrap > MVC > Views > Layouts folder I can see that it references the styles.min.css file as follows:
1.
@Html.StyleSheet(Url.WidgetContent("~/ResourcePackages/Bootstrap/assets/dist/css/styles.min.css"), "head")
Other than that the template makes no reference to any other JS or CSS resources.
So my question is this: How is Sitefinity adding the correct resources to the output?
I'd like to add certain custom CSS and JS files to that same pipeline/process so that it can be loaded the first time the user loads the site and so that it can be combined. We're trying to get this down to as few requests as possible.
Any help would be appreciated.
Hi,
Please refer to our documentation article about ResourcePackages for information about that: http://docs.sitefinity.com/feather-resource-packages
Regards,
Velizar Bishurov
Telerik