PHPackages                             dmcb/silverstripe-html-minification - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dmcb/silverstripe-html-minification

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

dmcb/silverstripe-html-minification
===================================

Minifies HTML of Silverstripe HTTP responses

0.1.0(8y ago)22602[2 issues](https://github.com/dmcb/silverstripe-html-minification/issues)BSD-3-ClausePHP

Since Nov 20Pushed 8y ago2 watchersCompare

[ Source](https://github.com/dmcb/silverstripe-html-minification)[ Packagist](https://packagist.org/packages/dmcb/silverstripe-html-minification)[ Docs](https://github.com/dmcb/silverstripe-html-minification)[ RSS](/packages/dmcb-silverstripe-html-minification/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

SilverStripe HTML minification
==============================

[](#silverstripe-html-minification)

Description
-----------

[](#description)

Minifies the HTML of SilverStripe HTTP responses.

Requirements
------------

[](#requirements)

- SilverStripe 4.x

Usage
-----

[](#usage)

Define HTML minification settings for your project in `mysite/_config/config.yml`. These are the default values:

```
  dmcb\HTMLMinification\Extensions\HTMLMinificationExtension:
    doOptimizeViaHtmlDomParser: true               // optimize html via "HtmlDomParser()"
    doRemoveComments: true                         // remove default HTML comments (depends on "doOptimizeViaHtmlDomParser(true)")
    doSumUpWhitespace: true                        // sum-up extra whitespace from the Dom (depends on "doOptimizeViaHtmlDomParser(true)")
    doRemoveWhitespaceAroundTags: false            // remove whitespace around tags (depends on "doOptimizeViaHtmlDomParser(true)")
    doOptimizeAttributes: true                     // optimize html attributes (depends on "doOptimizeViaHtmlDomParser(true)")
    doRemoveHttpPrefixFromAttributes: true         // remove optional "http:"-prefix from attributes (depends on "doOptimizeAttributes(true)")
    doRemoveDefaultAttributes: false               // remove defaults (depends on "doOptimizeAttributes(true)" | disabled by default)
    doRemoveDeprecatedAnchorName: true             // remove deprecated anchor-jump (depends on "doOptimizeAttributes(true)")
    doRemoveDeprecatedScriptCharsetAttribute: true // remove deprecated charset-attribute - the browser will use the charset from the HTTP-Header, anyway (depends on "doOptimizeAttributes(true)")
    doRemoveDeprecatedTypeFromScriptTag: true      // remove deprecated script-mime-types (depends on "doOptimizeAttributes(true)")
    doRemoveDeprecatedTypeFromStylesheetLink: true // remove "type=text/css" for css links (depends on "doOptimizeAttributes(true)")
    doRemoveEmptyAttributes: true                  // remove some empty attributes (depends on "doOptimizeAttributes(true)")
    doRemoveValueFromEmptyInput: true              // remove 'value=""' from empty  (depends on "doOptimizeAttributes(true)")
    doSortCssClassNames: true                      // sort css-class-names, for better gzip results (depends on "doOptimizeAttributes(true)")
    doSortHtmlAttributes: true                     // sort html-attributes, for better gzip results (depends on "doOptimizeAttributes(true)")
    doRemoveSpacesBetweenTags: false               // remove more (aggressive) spaces in the dom (disabled by default)

```

And extend any ContentControllers to enable HTML minification for the index output of that controller:

```
ContentController:
  extensions:
    - dmcb\HTMLMinification\Extensions\HTMLMinificationExtension

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3144d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1037133?v=4)[Derek McBurney](/maintainers/dmcb)[@dmcb](https://github.com/dmcb)

---

Top Contributors

[![dmcb](https://avatars.githubusercontent.com/u/1037133?v=4)](https://github.com/dmcb "dmcb (7 commits)")

---

Tags

silverstripeminifyminifcation

### Embed Badge

![Health badge](/badges/dmcb-silverstripe-html-minification/health.svg)

```
[![Health](https://phpackages.com/badges/dmcb-silverstripe-html-minification/health.svg)](https://phpackages.com/packages/dmcb-silverstripe-html-minification)
```

###  Alternatives

[lekoala/silverstripe-cms-actions

Add actions to your models in SilverStripe

39317.0k29](/packages/lekoala-silverstripe-cms-actions)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[lekoala/silverstripe-softdelete

Soft delete extension for SilverStripe

11212.9k](/packages/lekoala-silverstripe-softdelete)[nathancox/minify

Minifies CSS requirements using Minify (http://code.google.com/p/minify/)

26148.6k1](/packages/nathancox-minify)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
