Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option "HTML > remove unused attributes" #1565

Open
ghost opened this issue Sep 13, 2024 · 1 comment
Open

Option "HTML > remove unused attributes" #1565

ghost opened this issue Sep 13, 2024 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 13, 2024

Describe the bug

  1. There is an option in SingleFile to compress the HTML content, the option is activated by default to remove unnecessary content without changing the appearance of the document, reducing the file size:

image

  1. However, the option does not work on certain pages, keeping several unnecessary attributes in the source code elements, such as:

image2

  1. It seems that in general, custom attributes are not removed, leaving the file unnecessarily larger.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://gemini.google.com/share/1c4c3bc8cb01
  2. Save the page with SingleFile
  3. See the source code with several unnecessary attributes on the elements, just increasing the file size

Expected behavior
The page has unnecessary attributes removed, and the file size is smaller.

Environment

  • OS: Win10 Pro
  • Browser: Chrome
  • Version: 128
@gildas-lormeau
Copy link
Owner

The elements you've highlighted are attributes, not tags. This is why they are not removed. Removing unused attributes is not implemented in SingleFile. I also think it's a bit difficult to implement.

@gildas-lormeau gildas-lormeau changed the title SingleFile fails to remove unnecessary tags from elements Option "HTML > remove unused attributes" Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant