web-monitoring-ui
web-monitoring-ui copied to clipboard
Block page redirects and ask user how to proceed
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"
Can you include an example case here? I‘ve lost track of the original concrete case that triggered it.
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
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)
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.
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.
Ugh, this is pretty important and we still haven’t done it.