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

Deleting code duplication, re-arranging head elements and quick fixes #641

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cevdetardaharan
Copy link

  1. Deleting unnecessary "twitter:" meta elements to reduce code duplication, which "og:" meta elements can be used as fallback.
  2. Re-arranging head elements in order to make parsing faster (theorically).
  3. Changing self-closing elements typing from "/>" to ">".
  4. Changing uppercase doctype declaration to lowercase ("DOCTYPE" to "doctype"), in favor of saving 4bytes when compressing via gzip or brotli.

Resources

Twitter and OG meta elements:

  1. https://developer.x.com/en/docs/twitter-for-websites/cards/guides/getting-started
  2. https://developer.x.com/en/docs/twitter-for-websites/cards/overview/markup

HEAD arrangment

https://github.com/rviscomi/capo.js


There is a problem that I didn't fix (couldn't) which is there is a <style> tag renders before <meta charset="utf-8"> which may be bad, because it's suggested to do that:

Every page must declare a character encoding of UTF-8, using either the charset meta tag or the Content-Type HTTP response header. When the meta tag is used, it must be discoverable within the first 1024 bytes of the document.

…, which OG meta elements can be used as fallback, re-arranging head elements in order to make parsing faster (theorically), changing self-closing elements typing from "/>" to ">".
Copy link

vercel bot commented Jul 22, 2024

@cevdetardaharan is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant