Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

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

Open
cevdetta wants to merge2 commits intosveltejs:main
base:main
Choose a base branch
Loading
fromcevdetta:main

Conversation

@cevdetta
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 ">".
@vercel
Copy link

vercelbot commentedJul 22, 2024

@cevdetardaharan is attempting to deploy a commit to theSvelte Team onVercel.

A member of the Team first needs toauthorize it.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@cevdetta

[8]ページ先頭

©2009-2025 Movatter.jp