We have a situation where we need to set a cookie on a user's session. In order to do this we currently have a series of redirects in place:
Initial request > 30x
to get the cookie > 30x
set the cookie > 30x
to return the user to the original page requested.
These are all browser redirects and happen quickly enough, and only on the first "hit" so the user experience isn't negatively impacted. However I think there may be some concerns about the SEO ramifications of this process.
- For this purpose does a
301
redirect make the most sense (vs a302
)? - Will having three consecutive redirects be detrimental to page rank?
- Are there any best practices / hands on experience people have with this type of chained-redirect?
sessionid
cookie, which ishttp-only
so it cannot be set via JavaScript.