Kentico offers many settings, configurations and suggestions on how to improve your websites performance. Configuring Kentico correctly, you can realy optimize your website BUT there are still a few items which are not resolved like combining scripts and stylesheets into a single request. In this post I'll share my experience implenting a module created by Kentico Gold Partner PMC-Digital which combines scripts and stylesheets into a single request and caches them for you.
We've recently been reviewing a lot of what
Google PageSpeed Insites suggests for clients websites. Using the standard ASP.NET Web Forms in Kentico adds a lot of overhead with regards to markup and overall requests. During a recent
Kentico Ask The Experts Panel I was involved in, a question came up on Twitter about using a tool to combine resources in Kentico.
As I promised Pedro, I went and implemented the module on my site.
Implementation
Implementation was very easy as Pedro and his team provided some pretty detailed and easy instructions. I followed them exactly and only had one issue; a weird blank character causing problems during compile time. During the implementation, I had several questions for Pedro and he was very eager to answer them.
Evaluation and Testing
After implementing the module, I was very happy to see the number of requests drop from 52 to 29 on the KehrenDev.com interior pages. Not only did I see a drop in requests, I also noticed the site load speed decreased from ~900ms to ~700ms.
Note: we use caching pretty heavily on the KehrenDev.com website.
Unfortunately, when I implemented this in June, there was no support for the out-of-the-box Kentico CSS Stylesheets saved in the database. For us this was a deal breaker using it across other sites mainly because we rarely use stylesheets located in the file system. When I asked Pedro about it, he did find a workaround and eventualy a permenant solution. I've not yet implemented the permenant fix but do plan to in the next month.
Moving Forward
We've implemented this on several Kentico v8.2 and v9.x sites in the last few months where speed was an issue by with simply copying and pasting the code into the App_Code directory and adding the Module settings key. Moving froward as we pickup new projects, we will be implementing this module as part of our base Kentico install.
Thanks again PMC Digital and Pedro Maia Costa for your module and assistance with implementation!
Good Luck and Happy Coding!