Zverik / every_door

A dedicated app for collecting thousands of POI for OpenStreetMap
https://every-door.app
ISC License
418 stars 35 forks source link

Resolve redirects in QR codes #746

Closed Zverik closed 1 month ago

Zverik commented 5 months ago

Many QR codes are using URL shorteners. Try to resolve them.

coolultra1 commented 2 months ago

Altough websites might also redirect to sub-pages of themselves sometimes. (e.g. redirecting from / to /index.html or even to temporary error pages)

So we should probably only change the URL if the one redirected to is of a different domain. (Or have an index of URL shortener's domains, altough that's unrealistic.)

mnalis commented 2 months ago

quite a few redirects might be based on user-agent (e.g. separate pages for mobile agents), or change redirect target based on other data (language setting / cookies etc). And sometimes underlying website changes name (esp. if site doesn't own their domain, but redirect to some "free website" hosting which changes in a year or so, but some shorteners can be updated to link to new destination).

What is unrolling URL shorteners attempting to accomplish? Guard against URL shortener going out of the business, or ...? (That should be weighted against problems that unrolling might bring...)

mxxcon commented 2 months ago

What is unrolling URL shorteners attempting to accomplish? Guard against URL shortener going out of the business, or ...?

I consider it similar to Google analytics tracking url parameters. And URL shortners are relevant where URL length matters. In an app where you tap on it the length doesn't matter. And shortners just add another point of failure.

Zverik commented 1 month ago

Done in 5.2.