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. dmcb/silverstripe-html-minification

ActiveSilverstripe-vendormodule

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 7y 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 2mo 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 22% 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

3097d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b246332292ea94398f9c82722e4140d0a479654282ba0d45fff31123be87a2a?d=identicon)[dmcb](/maintainers/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

[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[silverstripe/cms

The SilverStripe Content Management System

5163.4M1.3k](/packages/silverstripe-cms)[silverstripe/admin

SilverStripe admin interface

262.6M325](/packages/silverstripe-admin)[nathancox/minify

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

28143.4k1](/packages/nathancox-minify)[silverstripe/widgets

Widgets are small pieces of functionality such as showing the latest Comments or Flickr Photos. They normally display on the sidebar of your website.

39411.8k20](/packages/silverstripe-widgets)[lekoala/silverstripe-cms-actions

Add actions to your models in SilverStripe

39279.9k22](/packages/lekoala-silverstripe-cms-actions)

PHPackages © 2026

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