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

Changes to Redirects aren't working well #1550

Open
cbunicef opened this issue Feb 20, 2023 · 2 comments · May be fixed by #1554
Open

Changes to Redirects aren't working well #1550

cbunicef opened this issue Feb 20, 2023 · 2 comments · May be fixed by #1554
Labels
enhancement New feature or request

Comments

@cbunicef
Copy link
Collaborator

Here's what I did:

  1. On zw.goodinternet.org, I created a redirect from /en/sandbox/your-health/ pointing to a page which was located at /en/sandbox/your-health/
  2. I changed the stub so that the page was located at /en/sandbox/your-health2
  3. The redirect successfully pointed /en/sandbox/your-health2/
  4. I then changed the page stub to /en/sandbox/your-health/
  5. The redirect continues to point to /en/sandbox/your-health2/
  6. Even after deleting the redirect, /en/sandbox/your-health/ redirects to /en/sandbox/your-health2/

I tried changing the redirect to point to another page, tried changing the Page stub to multiple other settings, the Redirect always seems to point to /en/sandbox/your-health2/

Desired behavior:

Changes to a Redirect should be successful.

If they are very delayed (eg 30 mins?) that should be clear to the Admin. If this delay is the case, right now it's difficult to understand because new Redirects are implemented immediately.

@cbunicef cbunicef added the bug Something isn't working label Feb 20, 2023
@cbunicef
Copy link
Collaborator Author

@ChrisMarsh82 Would like to discuss this in the afternoon call

@cbunicef
Copy link
Collaborator Author

cbunicef commented Feb 20, 2023

We identified that this is almost certainly due to browser caching 301 permanent redirects.

The general consensus online seems to be that for most of our common purposes 302 redirects are actually better. Our most common use cases involve promotions, testing, shortening for QR codes, etc, rather than permanently relocating a resource on the website. We do sometimes permanently relocate resources on the website, ie moving Pages, but the right way to handle that would be to offer the user an option to create a 301 redirect when the move the Pages.

Maybe the biggest issue is that Admins are shown that they have the ability to change or delete a permanent redirect, but this won't work for users that already accessed the link.

Let's change the settings so that by default redirects are NOT permanent.

Can we please change the text below permanent check box:

Recommendation: Do not use permanent redirects if you are setting up a promotion, QR code, or similar. Use permanent redirects if you are permanently moving the location of content on your site.
Cons: If you change or even delete a permanent redirect after you create it, the users who already accessed it will still continue to behave as if the original redirect is in place. This is because permanent redirects are normally stored by the user's browser until they delete their browser cache. Your browser may also store the permanent redirect until you clear its cache.
Pros: Permanent redirects ensure search engines forget the old page (the 'Redirect from') and index the new page instead.

@cbunicef cbunicef added the enhancement New feature or request label Feb 20, 2023
@Alihassanc5 Alihassanc5 linked a pull request Feb 22, 2023 that will close this issue
@cbunicef cbunicef removed the bug Something isn't working label Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant