Live data from Hacker News

How not to do URL redirects (… the way Quora does)

engineering.webengage.com

1–10 of 56 posts

Re: How not to do URL redirects (… the way Quora does)

#4
post #2

Would we get the right referer if 302 is done via quora redirect?

Not sure if I understood this correctly. If Quora chose to send a Location: some-url and Status: 302, it would have definitely worked as expected.

So what should an app do if it wants ro track all outbound links and send the real url as referer to the outbound link

Re: How not to do URL redirects (… the way Quora does)

#5
post #4

Earlier quoted context omitted.

Not sure if I understood this correctly. If Quora chose to send a Location: some-url and Status: 302, it would have definitely worked as expected.

So what should an app do if it wants ro track all outbound links and send the real url as referer to the outbound link

The best way to do it is probably to track clicks on outbound links using javascript.

Re: How not to do URL redirects (… the way Quora does)

#7

I don't see how this could be a result of simple mistake. There doesn't seem to be any reason to do redirects this way except hiding the referrer.

Exactly what is pointed out in the post. Why would someone want to hide the original referrer for a link.

Re: How not to do URL redirects (… the way Quora does)

#8
post #4

Earlier quoted context omitted.

So what should an app do if it wants ro track all outbound links and send the real url as referer to the outbound link

The best way to do it is probably to track clicks on outbound links using javascript.

Aren't there a few cases when this method won't work?

Re: How not to do URL redirects (… the way Quora does)

#9
post #4

Earlier quoted context omitted.

So what should an app do if it wants ro track all outbound links and send the real url as referer to the outbound link

The best way to do it is probably to track clicks on outbound links using javascript.

Aren't there a few cases when this method won't work?

Re: How not to do URL redirects (… the way Quora does)

#10
post #4

Earlier quoted context omitted.

So what should an app do if it wants ro track all outbound links and send the real url as referer to the outbound link

The best way to do it is probably to track clicks on outbound links using javascript.

Aren't there a few cases when this method won't work?
Post reply on HN