Script optimization when using Bootstrap, MVC and a custom W

Posted by Community Admin on 05-Aug-2018 15:47

Script optimization when using Bootstrap, MVC and a custom WebForms based widget

All Replies

Posted by Community Admin on 29-Mar-2016 00:00

We're trying to achieve optimal performance with regards to both CSS and JS under the following circumstances: 

  1. Sitefinity 8.x
  2. Project Feather
  3. Bootstrap
  4. MVC
  5. Custom WebForms based widget

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. 

Posted by Community Admin on 01-Apr-2016 00:00

Hi,

Please refer to our documentation article about ResourcePackages for information about that: http://docs.sitefinity.com/feather-resource-packages

Regards,
Velizar Bishurov
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed