pylorak / reloadmatic

Browser tab reload automation and utilities as a WebExtension
Mozilla Public License 2.0
22 stars 2 forks source link

URL for "Remember page" not specific enough #32

Open janobi opened 6 years ago

janobi commented 6 years ago

It seems the "Remember page" function doesn't work with the full URL. For example, https://en.wikipedia.org/w/index.php?title=Main_Page&action=history should not be treated as the same page as https://en.wikipedia.org/w/index.php?title=Talk:Main_Page&action=edit but right now, it is.

pylorak commented 6 years ago

I will add a special exception for Wikipedia in the next plugin version, but note this is normally a wanted feature and is by design. It only fails with Wikipedia because Wikipedia goes against all web-standards intentions, conventions and common practice by giving you totally different pages characterized by GET parameters, instead of just the same page loaded with different data. If I wanted to be strict, I could say Wikipedia should fix this and not me, but I'm not that headstrong.

janobi commented 6 years ago

Thanks for the quick response. I doubt that WP will change their ways anytime soon, even though they already made the change years ago to have the paths for viewing pages be /wiki/ instead of index.php with parameters. I think all wikis should get that exception though, as any given MediaWiki wiki of course has the exact same problem. I for one could regularly use the exact URL recognition in a foreign-language fan wiki. I imagine it would be hard to implement exceptions for all those sites (and I'd say it's likely that some other sites are affected as well), so I'd propose a feature that lets the user turn the exact URL recognition on and off everywhere on a per-site basis. You could have an option like "always use full URL on [sitename]", e.g. "...on wikipedia.org" when you're on a WP site.

pylorak commented 6 years ago

You're right that other Wiki-like sites might also be in the same shoes. But this is too much a technical detail to let the user have to configure it. I would prefer to have ReloadMatic detect wikis, though I've yet to try how to do that.

janobi commented 6 years ago

Gotta say, I like to be able to configure everything as a user :D

dl7ata commented 6 years ago

I have a similiar issue with https://aprs.fi/?c=raw&call=DB0TGO*&limit=25&view=normal . during normal operation it works, but it doesn't remember the page after wake-up/sleep-mode reactivation.

GPHemsley commented 5 years ago

There is no standard that says URLs that differ only on the query portion need be the same page. If this extension is explicitly ignoring them when determining what constitutes the same page, that is going to cause problems for more than just wikis. In fact, even in cases where two tabs have "the same page loaded with different data", the user may not want both views of that data to be refreshed.

I would recommend changing the extension behavior to only treat the fragment portion of the URL as ignorable for the purposes of determining "same page".

timelmer-uw commented 2 months ago

+1; this impacts ServiceNow, partially because of the way they structure their URLs, and likely also due to the fact that they update the browser URL after navigation (not sure if that should be a different issue, or even an issue at all, since it smells like ServiceNow abusing the history API).

For example, https://instance.service-now.com/now/nav/ui/classic/params/target/%24pa_dashboard.do != https://instance.service-now.com/now/nav/ui/classic/params/target/u_incident_task.do..., but will navigate to https://instance.service-now.com/now/nav/ui/classic/params/target/%24pa_dashboard.do when a link is clicked, before changing the URL.