How can I remove the junk content from published HTML pages?

I saw this question posted here about 2 years ago with no answer. I’m hoping there was an update that takes care of removing the extra CSS and JS files in the head section of my published HTML pages. This is slowing down pages by a lot. The first 9 resources that get downloaded have nothing to do with my pages.

Does anyone know if I can do this and how? If Percussion still doesn’t allow for this, has anyone written a script on the server that will edit the HTML to remove all of this junk? The image below is the head content that is added to all of my pages.

Hi Besart,

Here is why the system is including these:

  • perc_decoration.css (removed from published content in 5.2 and moved to the theme css) has common css used in templates that use any of the Percussion Widgets as well as portions of the UI.
  • jquery-ui-1.8.9.css is used by most Percussion widgets
  • perc_theme.css provides the base theme that the Percussion widgets use.  Check the Style tab in Design to see which theme you are using, your theme may be overriding these styles.
  • perc_region.css is generated when you have css styles added to templates in the Design -> Style area of a template.
  • jquery.js is used by all stock Percussion widgets.
  • perc_common_ui.js contains the JavaScript used by all stock Percussion widgets.
  • PercGlobalVariables.js supports the Global Variables feature
  • jquery.cookie.js is used by the stock membership widget
    We have some work planned but not yet scheduled to be a bit smarter on how these scripts are referenced - e.g. if you aren’t using Global Variables on a site, we shouldn’t include that JS reference.  Or if you are supplying your own JQuery - we don’t need to include ours.

 For all published output, we are looking at a combination of minification, concatenation, script inlining and async loading as part of a set of performance stories.  This doesn’t help you immediately, but I can tell you that this is an area that is important to us .

-n

 

I have posted similar like this in the past:

Performance issue with too many requests
https://community.percussion.com/percussion/topics/reduce_request_heres_an_suggestion
https://community.percussion.com/percussion/topics/reduce-percussion-requests

Most important
https://community.percussion.com/percussion/topics/minifying_everything_after_publishing

Hi! Posting on this topic to see if there are any new best practices or workarounds.

I’m trying to hit site performance pretty hard right now, and Percussion loads over 150 KB of scripts that we probably only need tiny snippets from, if anything at all. On a stripped-down page (no images, just text content, styles, fonts, basic scripts, and tracking tags) the Percussion-loaded scripts account for close to half the total page size.

I’ve been religiously avoiding jQuery in all our site scripting so that we would have the option to run without it. The only widgets we plan to use (other than custom widgets) are HTML widgets and Rich Text widgets.

Are there any workarounds or ways that we could reduce some of that up-front load? Thanks!

Hi Joseph,

We still have not shipped a minimal set of base templates (templates with no built in JavaScript or CSS dependencies) but this is still planned for the 5.4 release.  

-n

Hi, Nate,

That sounds awesome! Is there a ballpark for the release date on 5.4? No problem if there isn’t one yet. Thanks!