I was asked to introduce a unified self hosted URL-Shortener/Forwarder/Tracking Service for an website that earns money from affiliates. One example I found was one of the bigger german sites for bargains. (mydealz)
So I had a look at their way of doing it, and I was quite surprised.
From my point of view, the only sensible way to do the forwarding and tracking is using a PHP header redirect, if 301 or 302 in my eyes is mainly a question wether you want to double track double links or not.
But they do the forward using a small page using javascript window.location.href
. But why?
Is there any advantage that I don't see? Are there any disadvantages of the PHP redirect?
As far I as tested no referer are lost while using header redirect.
Thanks in advance for your help.