Cookie aint retrieving when visiting happens from a backlink.

Roy Smith roy at panix.com
Sat Oct 26 21:34:08 EDT 2013


In article <m2k3gz1ph6.fsf at cochabamba.vanoostrum.org>,
 Piet van Oostrum <piet at vanoostrum.org> wrote:

> ÉΪίκος Αλεξόπουλος <nikos.gr33k at gmail.com> writes:
> 
> > There is no set of cookie returned back when visitor comes from a referer.
> >
> > Isn't this strange?
> > No matter if you visit a webpage as a direct hit or via a referer the
> > cookie on the visitor's browser should have been present.
> >
> > But it can only can be found and retrieved as a direct hit and _not_
> > from a referrer backlink.
> 
> What is happening is that the page comes from the browser cache when you do a 
> back link (back button in your browser). So the request doesn't go to your 
> server. I checked this by switching off my internet connection and then 
> trying both the back button and entering the URL in the address bar. So it 
> has nothing to do with referrer, I think.

Unclear what this has to do with Python, but here's a couple of hints 
for debugging / exploring these kinds of issues.

1) Use a command-line tool such as curl to issue the request and see 
exactly what headers are send and come back.

2) If you want to do this inside a browser, use something like Chrome's 
Developer Tools.  In Chrome on the Mac, Command-Option-I will get you 
the tools screen, then click the network tab and send your request.  
It'll capture everything and you can drill down to see all the details.  
Any decent browser should have something similar (possibly as an add-on 
extension).



More information about the Python-list mailing list