Hacker News new | ask | show | jobs
by JoshTriplett 3719 days ago
304, not 403. And actually, only a 301 Permanent Redirect should be followed and used instead. bit.ly and URL shorteners it powers, which includes atav.st, use 301 Permanent Redirect.

Fetching the headers would also be a good way to check the MIME type (for automatic warnings like [pdf] or [video]), as well as checking the title.

1 comments

Of course 304, ungh. The reason 304 gets used more often than 301 even for essentially permanent redirects is because of browser caching... If you allow editing a redirect, then you might want to change future requests. Of course, many URL shorteners don't allow edits. As far as I know, some browsers don't cache-invalidate 301s. Haven't investigated recently, maybe there's an HTTP2 solution for this, or proper use of headers, or something.