fwenzel / copy-shorturl

A Firefox extension to quickly create a short URL for the current page and copy it to the clipboard.
https://addons.mozilla.org/addon/copy-shorturl
Apache License 2.0
35 stars 15 forks source link

Unexpected result on websites that define canonical URLs independent from content #116

Open Shudushi opened 3 years ago

Shudushi commented 3 years ago

Aufnahme1 Copy ShortURL is an excellent AddOn, exept on this URL:

https://geizhals.at/?cat=nb&xf=12822_6~12_16384~2379_17~2991_240~3710_Bluetooth+5~3710_WLAN+802.11ac~3710_WLAN+802.11ax~82_allgsosd~83_matt+(non-glare)~9_1920x1080&sort=p#productlist

Neither shortening with is.gd, tinyurl, nor bit.ly is working correctly, but copy the url and paste on bit.ly website is working fine. Shortened URL by Copy ShortURL (https://is.gd/eeQmwt) redirects to the right website (geizhals.at), but all the filters of the original URL are missing.

So it seems to me, that's something with Firefox and Copy ShortURL.

fwenzel commented 3 years ago

Thank you for highlighting it! This is actually a bug in the geizhals site:

image

Geizhals defines the canonical URL for this page like this, and Copy ShortURL is using this information.

fwenzel commented 3 years ago

This is a good point though, perhaps I'll make this an option in the preferences - there is already this setting:

image

I could add a setting "use website-provided canonical URL if present" (default... off?).

Shudushi commented 3 years ago

I learned now, that cononical url ist not what one sees in the browser adress bar. So IMO best solution is copying content of the browser adress bar, if that's possible.

If "use website-provided canonical URL if present" (default... off?) is it, than I'm fine. :-)

shawnboy99 commented 3 years ago

Following URL doesn't work either. Is it the same issue? Not techy here, sorry.

https://ourworldindata.org/explorers/coronavirus-data-explorer?zoomToSelection=true&pickerSort=asc&pickerMetric=location&Interval=Cumulative&Relative+to+Population=true&Align+outbreaks=false&country=USA~HKG~MAC~GBR~ISR~CAN~CHN~TWN~AUS~CHL~European+Union~High+income~IND~JPN~Low+income~Lower+middle+income~MEX~RUS~SGP~KOR~Upper+middle+income~OWID_WRL&Metric=People+fully+vaccinated

Shudushi commented 3 years ago

Seems to be the same issue with definition of the canonical URL directly in HTML-code in that page.

Canonical