4 ms·
Can something be written that strips the url of arbirary variables? http://foo.com/bar?aritrary-var=arbitrary-val http://foo.com/bar?aritrary-var=arbitrary-val
by kajecounterhack 19y ago
Can something be written that strips the url of arbirary variables?
http://foo.com/bar?aritrary-var=arbitrary-val http://foo.com/bar?aritrary-var=arbitrary-val
to just
http://foo.com/bar http://foo.com/bar
that would help because a lot of people end up posting links with ?source=newsletter or &sessionid=asdf1234ilikepie or etc
- natrius 19y agoThose variables are occasionally meaningful. Stripping them all off indiscriminantly would break some links.
- marcus 19y agoSo don't strip them indiscriminately, have the HN site compare submitted pages it gets by dropping them one by one to the original link, only maintain those that actually affect the resulting page.
- mixmax 19y agoWhat about: http://economist.com/articles?somearticle http://economist.com/articles?somearticle and http://economist.com/articles?entirelydifferentarticle http://economist.com/articles?entirelydifferentarticle