Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This website does some crazy redirect loop between medium at the sub domain when opened without JS. How is that even possible?


It returns a 302 header with this location:

https://medium.com/m/global-identity?redirectUrl=https%3A%2F...

Which then sends another location of:

https://onezero.medium.com/i-got-my-file-from-clearview-ai-a...

Which just ends up bouncing you back and forth, unless JS is allowed to percolate through. However, there is some useragent sniffing happening, so the exact set of headers changes.


Nothing magic, they're just sending a HTTP 302 redirect if they don't see a cookie. If you hit it with wget you'll see two 302s, one of them with the old "Moved Temporarily" text and the other with "Found". I'm not sure why you only get two with wget, possibly user-agent sniffing. Tracing with firefox's dev tools I see an initial JS redirect, but that may be a bug since I've got javascript disabled for medium. Alternatively it's a bug in NoScript and that's not good. Either way they'll toss a 302 with no js at all.


Potentially done with an http-equiv meta tag hidden inside a noscript tag

    < meta http-equiv=refresh content=0; url=http://example.com/ >


I had the same issue. Found it was because I had set Firefox to block all cookies for medium.com (probably to get around the article limit).


It didn't for me. (It did, however, make the content of the page load roughly two orders of magnitude faster.)


Also running into this issue.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: