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

Remove and flag client-side redirects in diffs #639

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

Mr0grog
Copy link
Member

@Mr0grog Mr0grog commented Nov 25, 2020

When viewing a diff of a page that has client-side redirects, the experience can be pretty confusing. Because we are diffing the page's HTML, you never see the actual comparison. The comparison loads, but then immediately redirects somewhere else (often a live webpage instead of an archived copy). The page looks fine, but things aren't highlighted like you might expect.

This change finds client-side redirects using the <meta> tag (and could handle other types of redirects in the future). It then removes them and adds a banner to the top of the page describing the redirect. This way, a user sees what was actually compared/diffed, and also gets notified about the redirect and has the option to investigate it.

Partially covers #201.

This looks like:

Screen Shot 2020-11-24 at 4 44 02 PM

(Most pages with client-side redirects, like this one, have no content. When there is content, the banner should get placed at the top.)

When viewing a diff of a page that has client-side redirects, the experience can be pretty confusing. Because we are diffing the page's HTML, you never see the actual comparison. The comparison loads, but then immediately redirects somewhere else (often a live webpage instead of an archived copy). The page *looks* fine, but things aren't highlighted like you might expect.

This change finds client-side redirects using the `<meta>` tag (and could handle other types of redirects in the future). It then removes them and adds a banner to the top of the page describing the redirect. This way, a user sees what was actually compared/diffed, and also gets notified about the redirect and has the option to investigate it.

Partially covers #201.
@Mr0grog Mr0grog merged commit 9640874 into main Nov 25, 2020
@Mr0grog Mr0grog deleted the 201-stop-with-the-confusing-client-redirects branch November 25, 2020 01:40
Mr0grog added a commit that referenced this pull request Nov 25, 2020
@Mr0grog
Copy link
Member Author

Mr0grog commented Nov 25, 2020

For reference, here’s an example of one where there is content on the page:

Screen Shot 2020-11-24 at 6 07 13 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant