Forum Moderators: Robert Charlton & goodroi
Per Google's advice, we systematically cleaned up duplicate URLs site-wide by 301-redirecting them to the canonical URLs.
However, a large number of these duplicate URLs were necessary for tracking purposes. We solved this by stuffing the tracking codes into a cookie during the 301 redirect, and pulling the codes back from the cookie when the browser hits the canonical URL.
This has worked well except for one thorny problem: browsers caching the 301 redirect. At first only the Mozilla browser was doing this, but now apparently Firefox is doing it as well. This throws off tracking, because a user's second and subsequent clicks on a URL will not request the URL with the tracking codes; the browser will go directly to the canonical URL since it "knows" that's what the user wanted all along. Fortunately, the set of circumstances necessary for a browser cache hit to occur, is still rare, but this could unacceptably affect our tracking if and when IE implements the 301 caching.
My question is, what else can we do to support URL-based tracking codes? Would issuing 302, not 301, be the wrong approach? We don't currently use?id=XX in our URLs, but if we did, is Google smart enough to treat the?id=XX as if it were the URL without that parameter, both for getting rid of duplicate URLs AND for coalescing their link popularity onto the canonical URL?
Do you think Google will change its guidelines on 301s as more browsers begin to cache them?