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

Fixes #3676 Delete unnecessary meta tags and re-order head element #3677

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

Conversation

cevdetardaharan
Copy link

@cevdetardaharan cevdetardaharan commented Nov 26, 2024

PR Summary:

This PR removes outdated and unnecessary meta tags (e.g., X-UA-Compatible and redundant twitter:* tags) and reorders head tags to improve browser performance and alignment with modern standards.

Why are these changes introduced?

Fixes #3676 .

What approach did you take?

  • Removed the X-UA-Compatible meta tag as it is no longer relevant (IE=edge support is obsolete).
  • Removed twitter:* meta tags that duplicate og:* functionality, as Twitter uses og:* tags as a fallback.
  • Reorganized head tag elements based on priority to enhance browser rendering performance.
  • Updated 3 files:
    • layout/password.liquid
    • layout/theme.liquid
    • snippets/meta-tags.liquid

Other considerations

These changes streamline the <head> elements without altering visible functionality or merchant workflows.

Decision log

# Decision Alternatives Rationale Downsides
1 Removed unnecessary meta tags Retain existing tags Simplifies codebase and ensures compliance with modern web standards Slight risk of edge-case compatibility issues
2 Reordered head tags for optimization Leave unordered Improves rendering efficiency in browsers None

Visual impact on existing themes

There are no visible changes to the storefront or merchant workflows. These changes only impact backend performance and HTML structure.

Testing steps/scenarios

  • Ensure the changes do not introduce errors in the <head> for both logged-in and guest users.
  • Test meta tag visibility using browser developer tools on all layouts (e.g., password-protected page, theme layout).
  • Verify social media sharing works as expected using Open Graph preview tools.

Demo links

Checklist

@cevdetardaharan
Copy link
Author

I have signed the CLA!

@cevdetardaharan
Copy link
Author

@ludoboludo @Roi-Arthur @tyleralsbury Can you review?

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.

Delete unnecessary meta tags and re-order head element
1 participant