More in this section
Forums / Project Feather / Script optimization when using Bootstrap, MVC and a custom WebForms based widget

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

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Jacques
    Jacques avatar
    427 posts
    28 Jun 2007
    29 Mar 2016
    Link to this post

    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 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. 

  2. Velizar Bishurov
    Velizar Bishurov avatar
    143 posts
    18 Sep 2017
    01 Apr 2016
    Link to this post

    Please refer to our documentation article about ResourcePackages for information about that:

    Velizar Bishurov
    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
2 posts, 0 answered