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

Block page redirects and ask user how to proceed #201

Open
weatherpattern opened this issue Feb 6, 2018 · 6 comments
Open

Block page redirects and ask user how to proceed #201

weatherpattern opened this issue Feb 6, 2018 · 6 comments

Comments

@weatherpattern
Copy link
Contributor

When Scanner finds a page with the redirect, raise up a pop-up window (in frame) with the text below.
Close link goes the pop-up and stay on the original screen.
Proceed link goes to the redirect page.

"This page has a redirect to this url:
url.com
Close Proceed"

@Mr0grog
Copy link
Member

Mr0grog commented Feb 6, 2018

Can you include an example case here? I‘ve lost track of the original concrete case that triggered it.

@Mr0grog
Copy link
Member

Mr0grog commented Feb 6, 2018

Ah, right, thank you!

So some redirects, like this one, which uses a <meta http-equiv="refresh" content="0; url=https://www.epa.gov/pi" /> element, are easy to handle by removing them (or replacing them with a custom script) when we change the page’s base in SandboxedHtml.

On the other hand, we probably can’t handle script-based redirects right now:

  • We could pre-load, manipulate, and inject scripts in the same place above, where are manipulating the HTML source (super complicated)
  • We could use a service worker (requires us to have a completely different way of loading the page, which we need anyway; see Solve rendering problem when iframe loads content from https or touches storage/cookies web-monitoring#92)
  • We could have a proxy service that manipulates the script (like the service worker, this would require us to have a totally different way of loading the page, which we need to do regardless)

@weatherpattern
Copy link
Contributor Author

We could break it into two part. One for the easy redirects, and another for script-based ones.

Wondering out loud if either of them is v0.0.2.

@stale
Copy link

stale bot commented Jan 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in seven days if no further activity occurs. If it should not be closed, please comment! Thank you for your contributions.

@stale stale bot added the stale label Jan 23, 2019
@Mr0grog
Copy link
Member

Mr0grog commented Jan 24, 2019

Ugh, this is pretty important and we still haven’t done it.

@Mr0grog Mr0grog modified the milestones: Backlog, v0.1 Jan 24, 2019
@stale stale bot removed stale labels Jan 24, 2019
@stale stale bot added the stale label Jul 23, 2019
@edgi-govdata-archiving edgi-govdata-archiving deleted a comment from stale bot Aug 1, 2019
Mr0grog added a commit that referenced this issue 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.
Mr0grog added a commit that referenced this issue 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants