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

Minor Performance Enhancements and Fixes for Website 💻 #7789

Closed

Conversation

sanjaiyan-dev
Copy link
Contributor

Hi, this pull request contains minor performance improvements and fixes for the website.

  1. Making the Open Graph image a full path URL (/assets/og-image.png to https://crates.io/assets/og-image.png). This change ensures that the Open Graph image works as expected, as Open Graph only supports absolute file paths.

  2. Adding the inputmode attribute to the search input for better accessibility (Reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode#search).

  3. Adding the decoding attribute to images with async for better image rendering. This is a default option in the popular Next.js framework (Reference: https://nextjs.org/docs/app/api-reference/components/image#other-props).

  4. Adding <link rel="preload" as="script" href="..." /> for faster loading of JavaScript needed for the website (Reference: https://web.dev/articles/preload-critical-assets#preloading_javascript_files).

  5. Adding scroll-behavior: smooth in CSS for a sleeker user experience.

Extremely sorry, if I made any mistakes :)

@Turbo87
Copy link
Member

Turbo87 commented Dec 23, 2023

Hi Sanjaiyan, first of all thanks for the PR!

Could you split the commit up so that each change has a dedicated commit? This will make it easier to:

  • review and discuss the changes individually
  • potentially revert a change
  • find potential issues afterwards with git bisect

I'd personally even make it multiple PRs, but that's up to you since the changes are quite short.

@sanjaiyan-dev
Copy link
Contributor Author

I'd personally even make it multiple PRs, but that's up to you since the changes are quite short.

Hi @Turbo87, should I create 5 pull requests ?

@sanjaiyan-dev
Copy link
Contributor Author

I'd personally even make it multiple PRs, but that's up to you since the changes are quite short.

Hi @Turbo87, should I create 5 pull requests ?

Or do I need to classify each pull request, creating one for CSS and HTML, and another for performance? Sorry for disturbing you. (@Turbo87)

@sanjaiyan-dev
Copy link
Contributor Author

sanjaiyan-dev commented Dec 24, 2023

Hi Sanjaiyan, first of all thanks for the PR!

Could you split the commit up so that each change has a dedicated commit? This will make it easier to:

  • review and discuss the changes individually
  • potentially revert a change
  • find potential issues afterwards with git bisect

I'd personally even make it multiple PRs, but that's up to you since the changes are quite short.

Hi @Turbo87,

I have separated each PR according to your suggestion:

User experience-related: #7801
Web load performance-related: #7800
Social media SEO optimization-related: #7802

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.

2 participants