+1-888-365-2779
Try Now
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

2 posts, 0 answered
  1. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    29 Mar
    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 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. 

  2. Velizar Bishurov
    Velizar Bishurov avatar
    143 posts
    Registered:
    01 Dec 2016
    01 Apr
    Link to this post
    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
     
2 posts, 0 answered