Back when I worked at Seattle Children’s Hospital I was in charge of implementing and running our CMS platform which at the time and I believe still is Ektron. When I worked with the software which was I believe around version 7 and a little bit into version 8, the software did a lot for you which was great. But it was also incredibly bloated and assets were not well managed adding a good amount of extra or extraneous scripts and styles. I made it a goal to remove some of this extraneous Ektron code.
A few instances of this were scripts that were injected to perform some common functionality, but often are actually not needed at all. Blog commenting scripts, and a “blank.css” file were just a couple of instances of unnecessary assets that got loaded despite the fact we weren’t using them.
I am a little bit of a purest when it comes to this, so I cobbled together some code that would remove these scripts and some other unneeded elements from my Ektron based pages.
On a old blog platform that was powered on Umbraco (my CMS of choice now days) I had a post in which I outlined this code and it got a fair amount of traffic. Through many site redesigns, restructures and database changes the post has been lost, and I had thought the code went with it. Today I ran across it again on an old snippet site I used to use and so I thought I would share it out again as I have been contacted a couple of times recently about this post.
- This code was written 3+ years ago, and its quality is likely not the best. It could probably be rewritten to be much cleaner.
- This only applies for sure to Ektron 7.x. This likely was somewhat corrected in version 8 and other versions since.
- I make no guarantees about this code. As with all bits of code you incorporate from third parties, use at your own risk.