Skip to content

Strip comments when altering the DOM #2026

@whi7ed3vil

Description

@whi7ed3vil

I've got some fairly complicated CSS overlays that end up in various parts of the DOM. In low resource environments, the repetitive/recursive application of these styles can become a bit bloated on a page. This is compounded by the comments left in the DOM from the original CSS. I'd request that the application default behavior is to strip comments and lexicographically condense the CSS when injecting into the DOM for faster parsing. This might be a marginal gain in most settings, but I believe in making good use of comments as these living documents are modified, and that seems opposed to the implementation strategy which allows all those useless bytes to remain recursively embedded in the live page. Over time, it does seem to cause some noticeable performance delays. Perhaps a setting would allow the purists to prevent contraction before injection? But I don't see any reason to allow comments and extra whitespace for that matter to be embedded after the injector knows what to put where.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions