N
Nick the Gr33k
Hello i having the following code to try and retrieve the visitor's
saved cookie form the browser.
It works as expected except form the fact from when the visitor enters
my webpage(superhost.gr) by clicking a backlink of another webpage.
Then even if the cookie exists in his browser for some reason the try
fails and except take actions.
Can somebody explain why this is happening?
You can see this action yourself by hitting:
1. superhost.gr as a direct hit
2. by clicking superhost.gr's backlink from ypsilandio.gr/mythosweb.gr
You will see than in 2nd occasion another ebtry will appear in the
database here:
http://superhost.gr/?show=log&page=index.html
saved cookie form the browser.
Code:
# initialize cookie and retrieve cookie from clients browser
try:
cookie = cookies.SimpleCookie( os.environ['HTTP_COOKIE'] )
cookieID = cookie['name'].value
except:
cookieID = 'visitor'
It works as expected except form the fact from when the visitor enters
my webpage(superhost.gr) by clicking a backlink of another webpage.
Then even if the cookie exists in his browser for some reason the try
fails and except take actions.
Can somebody explain why this is happening?
You can see this action yourself by hitting:
1. superhost.gr as a direct hit
2. by clicking superhost.gr's backlink from ypsilandio.gr/mythosweb.gr
You will see than in 2nd occasion another ebtry will appear in the
database here:
http://superhost.gr/?show=log&page=index.html