Serving a Permanent 301 redirect or a Temporary 302 redirect in Django is very straightforward using the redirect shortcut (which in turn just uses HttpResponsePermanentRedirect or HttpResponseRedirect)
I need to count how many times a redirect was used, but if I use 301, my view is only hit on the first request. Browsers presumably cache the new URL, because successive requests don't hit my view.
And yet I can see that many URL shortening services (http://searchengineland.com/analysis-which-url-shortening-service-should-you-use-17204) do use 301 AND count hits.
How do they do this? I can see they write cookies, but I don't understand what this buys you?