A
A
Alexander Savchuk2015-07-02 17:20:34
Django
Alexander Savchuk, 2015-07-02 17:20:34

What response code to use?

Good afternoon!
In I need to develop the following functionality, there is a link, say site.com/g/u29au92hx9749hxiuiu939 (1),
when I go to it, I need to redirect the user to the appropriate URL, say another-site.com/some-path (2).
So the actual questions?

  • How to make it so that when you re-pass to link 1, the browser does not use the value from the cache? (I used a 302 redirect and when re-passing the browser did not go directly to the URL(1), but used the cached value)
  • Is the 307 code right for my purposes? (following from the specifications, it is not cached
  • And yes, if I use some kind of redirect code, will the HTTP Referer header be set to (1), and not to the address of the site on which I clicked on this link (1)?

Thank you in advance :-)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2015-07-02
@BuriK666

Do 302 and add Cache-Control etc. so it doesn't cache.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question