F
Ferrous Cranus
# retrieve cookie from client's browser otherwise set it
try:
cookie = cookies.SimpleCookie( os.environ.get('HTTP_COOKIE', '') )
cookieID = cookie['ID'].value
except:
cookieID = str( time.time() )
cookieID = cookieID[-3:]
cookie['ID'] = cookieID
Many times i noticed that the script instead of retrieving the cookie ID value so to identify each visitor uniquely it insteads set its again.
The same think also happens when someone comes to superhost.gr via a link from anothwe webpage
can somebody tell me why this is happening?
is there some flaw in my code? Perhaps it can be written more efficiently?
try:
cookie = cookies.SimpleCookie( os.environ.get('HTTP_COOKIE', '') )
cookieID = cookie['ID'].value
except:
cookieID = str( time.time() )
cookieID = cookieID[-3:]
cookie['ID'] = cookieID
Many times i noticed that the script instead of retrieving the cookie ID value so to identify each visitor uniquely it insteads set its again.
The same think also happens when someone comes to superhost.gr via a link from anothwe webpage
can somebody tell me why this is happening?
is there some flaw in my code? Perhaps it can be written more efficiently?