ampproject / ampproject/amp-toolbox

Optimizer: add more HTML minification rules

Open
#594 0 comments 0 reactions 0 assignees View on GitHub
enhancement toolbox-optimizer
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.