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

Feature/prerender redirect response #1386

Merged
merged 4 commits into from
Jun 13, 2024
Merged

Conversation

jswift
Copy link
Contributor

@jswift jswift commented Jun 12, 2024

Description of the proposed changes

  • Don't return (or cache) the actual page when it is a redirect (301/302), instead return text saying the page has moved. This aligns with the "usually" in the spec (https://www.rfc-editor.org/rfc/rfc9110#status.301) and may prevent google search issues. It also reduces the size of cache, especially if there are many redirects.
  • Additionally I've added instructions on running the prerender fargate container locally since I had to work that out to test this
  • I updated the package version to the current one, not sure if that was correct or not

This has been tested against this page that returns a 301: https://www.discountpartysupplies.com.au/food-decor/baking-and-cake-decorating.html

Screenshots (if applicable)

N/A

Other solutions considered (if any)

  • None

Notes to PR author

⚠️ Please make sure the changes adhere to the guidelines mentioned here

Notes to reviewers

🛈 When you've finished leaving feedback, please add a final comment to the PR tagging the author, letting them know that you have finished leaving feedback

TheOrangePuff
TheOrangePuff previously approved these changes Jun 13, 2024
Copy link
Contributor

@TheOrangePuff TheOrangePuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@crispy101
Copy link
Contributor

LGTM but ver.2.4.0 is already taken. 2.5.0 to go :)

@crispy101 crispy101 self-requested a review June 13, 2024 00:20
@jswift
Copy link
Contributor Author

jswift commented Jun 13, 2024

@crispy101 happy now?

@crispy101
Copy link
Contributor

@crispy101 happy now?

Yes, sir.

@jswift jswift merged commit 12bbef3 into main Jun 13, 2024
1 check passed
@jswift jswift deleted the feature/prerender-redirect-response branch June 13, 2024 06:08
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.

3 participants