ScriptMerge

Less CSS and JS files on your pages increases your page speed. This extension allows you to merge files together, so that less HTTP requests are required.

ScriptMerge features

Merging CSS and JavaScript files

Merging CSS and JavaScript files

To decrease the number of HTTP-requests needed to load your site, ScriptMerge allows you to merge CSS-files and JavaScript-files together. Because some CSS-code or JavaScript might give huge problems when combined with other files, ScriptMerge also allows you numerous options to exclude files from being merged (by filename, by component, by Menu-Item).

CSS and JavaScript compression

CSS and JavaScript compression

Optionally, CSS-code and JavaScript-code can be compressed. This can be either done using simple PHP-rules (included in ScriptMerge) or third party libraries. Also, ScriptMerge includes an option for basic HTML-compression.

Merging on the fly or in cached files

Merging on the fly or in cached files

Merged (and optionally compressed) output can be stored in cache-files, so that the next time the page is visited, the JavaScript and/or CSS is immediately ready for output. In some situations (when you have lots of pages using lots of different extensions) this might lead to huge numbers of cache-files. For that, ScriptMerge also allows for showing merged scripts on the fly (using a filelist-mechanism).

Images through data-URIs

Images through data-URIs

ScriptMerge also includes the advanced feature of data-URIs: The plugin includes an opton to transform the image into a base64-datastream which is included directly in the CSS-code. This trick gives the benefit of even less HTTP-requests. A maximum filesize can be configured to skip creating data-URIs for images above a certain size.

Following CSS imports, relative URLs

Following CSS imports, relative URLs

When merging CSS-stylesheets, ScriptMerge tries to follow @import-statements so that all linked CSS-stylesheets are included. While merging CSS-definitions, it also replaces relative paths pointing to images with absolute paths.

Deferred script-loading

Deferred script-loading

When replacing JavaScript and CSS-files with merged files, you can configure the location of this merged output by configuring the plugin. Locations include the top of the body, the top of the header or the bottom of the body.

Support for binaries

Support for binaries

When your hosting environment has support for the jsmin-binary or WebP-integration, you can configure these binaries in the plugin parameters. The jsmin-binary offers you a more solid JavaScript compression-technique, while WebP allows you to replace JPG and GIF images with a new image-format (currently only supported by Chrome browsers).