ampproject / ampproject/amp-toolbox
Optimizer: add more HTML minification rules
- Dominant language
- HTML
- Stars
- 459
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
Things to consider:
* trimming whitespace in body text nodes if possible
* removing quotes where they are not needed (lang="en_US" => lang=en_US)
* removing unneeded attribute values (disabled="disabled" => disabled)
* removing redundant attribute values where the values is the default ( => )
* removing optional tags: https://html.spec.whatwg.org/multipage/syntax.html#optional-tags
* decoding HTML entities into Unicode characters (© => ©)
//cc @alainschlesser
Contributor guide
Research direction
Start by locating the optimizer's existing HTML minification rules, then review the linked WHATWG optional-tags specification and assess each proposed transformation. Done means implementing the agreed safe rules and verifying that the resulting HTML remains valid while becoming smaller.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- tooling, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100