web-monitoring-ui icon indicating copy to clipboard operation
web-monitoring-ui copied to clipboard

Block page redirects and ask user how to proceed

Open weatherpattern opened this issue 7 years ago • 6 comments

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"

weatherpattern avatar Feb 06 '18 01:02 weatherpattern

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

Mr0grog avatar Feb 06 '18 06:02 Mr0grog

Sure. Example: https://www.epa.gov/region9/islands/guam.html For reference: https://monitoring.envirodatagov.org/page/7c675c7b-ac77-4ae2-9b86-3553c16b3c53/059e166e-f712-4803-b7c9-a192faf3ee13..f881540f-372d-4d05-b847-7f96fb85d67f

weatherpattern avatar Feb 06 '18 20:02 weatherpattern

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 edgi-govdata-archiving/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)

Mr0grog avatar Feb 06 '18 20:02 Mr0grog

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.

weatherpattern avatar Feb 06 '18 21:02 weatherpattern

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[bot] avatar Jan 23 '19 19:01 stale[bot]

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

Mr0grog avatar Jan 24 '19 03:01 Mr0grog