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

Encode space in files as + in the URLs #1172

Open
rufuspollock opened this issue Jun 4, 2024 · 5 comments
Open

Encode space in files as + in the URLs #1172

rufuspollock opened this issue Jun 4, 2024 · 5 comments

Comments

@rufuspollock
Copy link
Member

rufuspollock commented Jun 4, 2024

Encode space in files as + in the URLs.

Right now, files with spaces in them are URL enconded in the traditional way giving URLs like this https://datahub.io/@davidgasquez/handbook/Making%20Decisions. Having Making+Decisions makes it easier to read and reference online from memory.

@willy1989cv
Copy link
Member

willy1989cv commented Jul 4, 2024

Encode space in files as + in the URLs

Situation

Currently, URLs with spaces are encoded as %20, which is technically correct but less readable and user-friendly.
The encoding of space to %20 is typically handled automatically by Next.js, but we need to verify this and identify any specific places in our code where this encoding occurs (if so).

Problem

The %20 encoding for spaces in URLs reduces readability and can negatively impact user experience. We want to improve this by encoding spaces as +.

Solution

  • Update URL encoding logic:
    • Replace spaces with + for new URLs.
    • Ensure backward compatibility by supporting %20 encoded URLs.
  • Handle redirects:
    • Implement proper redirections from old URLs (%20) to new URLs (+) to avoid broken links.
    • Monitor SEO impact and adjust redirection strategies accordingly.
  • Address Risks:
    • SEO Impact: Maintain existing SEO rankings by using 301 redirects to inform search engines of the URL changes.
    • Broken Links: Develop a comprehensive testing strategy to identify and fix broken links, ensuring a seamless user experience.

Appetite

This implementation can take from 8 to 12 hours.

Rabbit Holes

  • Identify Encoding Locations: Analyze where the encoding of spaces to %20 is happening, whether it is handled automatically by Next.js or explicitly in our code.
  • Legacy URLs and Redirections: I think we need to be careful when handling existing/legacy URLs, making sure it redirects to new URL format without breaking, so it does not affect SEO.

Cc: @olayway

@olayway
Copy link
Member

olayway commented Jul 4, 2024

The risks you mentioned should be addressed in the solution part.

@olayway
Copy link
Member

olayway commented Jul 4, 2024

Avoid any changes that break existing URLs without proper redirection.

This is not really a no go, rather a specific solution part/approach.

@olayway olayway removed their assignment Jul 4, 2024
@rufuspollock
Copy link
Member Author

@willy1989cv where is the encoding of space to %20 happening? I believe nextjs does it automatically or if not where in our code is it happening? That should be clearly analysed in the situation.

@willy1989cv
Copy link
Member

@willy1989cv where is the encoding of space to %20 happening? I believe nextjs does it automatically or if not where in our code is it happening? That should be clearly analysed in the situation.

Yes! @rufuspollock I agree! I was only worried about SEO and was not asking this main question! added it to the shaping! thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗 In progress
Development

No branches or pull requests

3 participants