Portal Engine Resource Combiner

by PMC-Digital
Portal Engine Resource Combiner preview

Price

$0

Details

Licence:
Free
Works with:
9.0
Version:

Web site

http://pmc.digital/resourcecombiner/

Summary

A resource combiner module that can be used with Kentico's Portal Engine to combine AXD, CSS and JavaScript Resource Includes.

Description

If the module is enabled it will automatically combine all the WebResource.axd or ScriptResource.axd it can find on the output of a page.

When combining JS or CSS includes, you'll need to register these, using the GetResource.ashx method, in a specific way that the module can parse when replacing the output of a page.

For CSS, the link include needs to be registered with the attributes in the href, type and rel order, and the GetResource.ashx url must contain the "&combiner=css" querystring key.

Each group of CSS includes will be replaced by a single reference identified by a guid that the handler uses to get the combined CSS for the whole group.

With Javascript, the script include attributes need to be in the src and type order, and the GetResource.ashx url must also contain the "&combiner=js" querystring key.

Like how it works with the other combine modes, each Javascript include group will be replaced by a single reference identified by a guid that the custom handler uses to get the combined Javascript for the whole group.

Additional notes:

  • Please read the readme.txt file on the package for installation instructions.
  • You can create additional js and css groups by defining a "&combiner=group1" instead of the default css or js.
  • Guid is created at response output time with the combination of the files grouped and cached so the handler can retrieve them in a separate request.
  • The handler include for the group will be placed where the first item of its group is on the original response output.
  • The attribute order of the targets matters (e.g. type="text/javascript" after src) so please follow the examples.
  • JavaScript or CSS included in postbacks is not combined.