Requests and redirections, waste of time? : <p>Let's say that I perform a GET request on a URL (this one for example: <a href="http://pubs.acs.org/doi/abs/10.1021/acs.accounts.5b00398" rel="nofollow">http://pubs.acs.org/doi/abs/10.1021/acs.accounts.5b00398</a>), and that I trace the request:</p>

<pre><code>response = requests.get(url, timeout=10)
if response.history:
    print("Request was redirected")
    for resp in response.history:
        print("Status code, URL: {}, {}".format(resp.status_code, resp.url))
    print("Final destination:")
    print("Status code, URL: {}, {}".format(resp.status_code, response.url))
else:
    print("Request was not redirected")
</code></pre>

<p>The output is:</p>

<pre><code>Request was redirected
Status code, URL: 302, http://pubs.acs.org/doi/abs/10.1021/acs.accounts.5b00398
Status code, URL: 302, http://pubs.acs.org/doi/abs/10.1021/acs.accounts.5b00398?cookieSet=1
Final destination:
Status code, URL: 302, http://pubs.acs.org/doi/abs/10.1021/acs.accounts.5b00398
</code></pre>

<p>I would like to know a few things:</p>

<ul>
<li>why does the server redirects me to the url + cookieSet=1 ? To give me a cookie ?</li>
<li>Does this redirection take time ?</li>
<li>If so, could I request the cookie page in the first place ?</li>
<li>If I have to perform several requests on the same server, should I use a session, if the server gives me a cookie ?</li>
</ul>
