5 ms·
Worth pointing out that t.co has always been an instance of an annoying and seemingly unjustified practice I named "nonsemantic redirect". Rather than legitimat
by hlandau 3y ago
Worth pointing out that t.co has always been an instance of an annoying and seemingly unjustified practice I named "nonsemantic redirect". Rather than legitimately redirecting using an HTTP Location header, it instead is an HTML page with a META refresh tag on it.
You don't see this with curl/wget because they use user agent sniffing. If they don't think you're a browser they _will_ give you a Location header. To see it, capture a request in Firefox developer tools, right click on the request, copy as CURL. (May need to remove the Accept-Encoding tag and add -i to see the headers).
- mzs 3y agoNo, in fact now t.co even returns an empty body with it's 301 response: % curl -vgsSw'< HTTP/size %{size_download}\n' https://t.co/DzIiCFp7Ti 2>&1 | grep '^< \(HTTP/\)\|\(location: \)' < HTTP/2 301 < location: https://www.threads.net/@chaco_mmm_room < HTTP/size 0
- flutas 3y agoFirefox: <head><noscript><META http-equiv="refresh" content="0;URL=https://www.threads.net/@chaco_mmm_room"></noscript><title>https://www.threads.net/@chaco_mmm_room</title></head><script>window.opener = null; location.replace("https:\/\/www.threads.net\/@chaco_mmm_room")</script>
- mzs 3y agoTurns-out it depends on the User-Agent: https://news.ycombinator.com/item?id=37139425 https://news.ycombinator.com/item?id=37139425
- mlyle 3y agoYou didn't read the second paragraph of the comment you replied to-- which explained this exact issue before you replied "no": > You don't see this with curl/wget because they use user agent sniffing. If they don't think you're a browser they _will_ give you a Location header. To see it, capture a request in Firefox developer tools, right click on the request, copy as CURL.
- mzs 3y agoIndeed, sorry everyone
- ShamelessC 3y agoCould you explain what the intended/expected outcome is for this? What is accomplished by doing that?
- spiderfarmer 3y agoCookies?
- dalore 3y agoCrawlers and tools will get the right location http header but browsers and users will get the delay.
- yahelc 3y agoThe purpose is so that Twitter is seen as the source of the traffic. A lot of Twitter-sourced traffic comes from native apps, so when people click links from tweets, they usually don’t send referrer information. If the redirects were server side (setting the Location header), a blank referrer remains blank. Client side redirects will set the referral value. From Twitter’s POV, there’s value in more fully conveying how much traffic they send to sites, even if it minorly inconveniences users.
- gcr 3y agoHow does this inconvenience users? It sounds like you’re saying site owners will be able to distinguish between users with a blank referer and users whose “referer” was the desktop app. Ignoring the privacy angle, isn’t that a good thing?
- jauco 3y agoOther than the privacy angle a meta redirect is always a bit slower than a location header. You need to send an html page (more bytes) that the browser needs to render and then act on (more work). A location header is nearly unnoticeable, a meta refresh page gives you a flash of a blank interstitial screen. (Not that I had the same annoyance, just explaining the difference to the end user of the two approaches)