Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.071 X-Spam-Evidence: '*H*': 0.86; '*S*': 0.00; 'charset:iso-8859-7': 0.04; 'attribute': 0.07; 'cookie': 0.09; '#this': 0.16; 'cached': 0.16; 'set:': 0.16; 'situation.': 0.16; 'subject:when': 0.16; 'wrote:': 0.18; 'passing': 0.19; 'memory': 0.22; 'otherwise,': 0.22; 'saying': 0.22; 'browsers': 0.24; 'instead.': 0.24; 'header:In- Reply-To:1': 0.27; 'host': 0.29; 'specifically': 0.29; 'am,': 0.29; 'said,': 0.30; 'message-id:@mail.gmail.com': 0.30; 'requests': 0.31; 'expire': 0.31; 'them?': 0.31; 'probably': 0.32; 'another': 0.32; 'subject:from': 0.34; 'problem': 0.35; 'received:google.com': 0.35; 'date.': 0.36; 'should': 0.36; 'seconds': 0.37; 'button': 0.38; 'skip:o 20': 0.38; 'server': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'most': 0.60; 'browser': 0.61; "you're": 0.61; 'back': 0.62; "you've": 0.63; 'visit': 0.64; 'press': 0.70; "browser's": 0.84; 'happened.': 0.84; 'subject:gets': 0.84; 'expires': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=m9LfkKfOIsbGfP9yj3udupYR9GnyQ8DyE7/y3cEg5rU=; b=kwJIBni3Rpc8FN8SUErkKlSWD5Hp4eTWWR9Qn2t97FRZrBK495V3KMQsg/+NDAbK5+ cR/yMpbEYVk315yDP1QPoBNVAv7vtwPkB0fSU+QNHrtjsoqw2KAk9lbQa+cp4vvZ42W8 NZvW/nAeWavDbmhGvLlwmrYBqaiX8M5hKb6GgSnuRYHBqt9l1xtXd0kDzLEgooHWWUNW z2jwpx5F9FR580H4fnJ9zKWFio1I7e1aOikboeOW6VVPiIEcOGn0Z7b9I6Xu0BGRY7aB 2XI8BJMhu/z84d6e7AmKzyclhGVcqXemzge+aCTbdXQJ3jAxvXoc46K54B7tZKBTg0eF r50Q== X-Received: by 10.68.191.193 with SMTP id ha1mr1028730pbc.166.1381294474159; Tue, 08 Oct 2013 21:54:34 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Ian Kelly Date: Tue, 8 Oct 2013 22:53:53 -0600 Subject: Re: Cookie gets changed when hit comes from a referrer To: Python Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1381294482 news.xs4all.nl 15956 [2001:888:2000:d::a6]:41102 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:56464 On Tue, Oct 8, 2013 at 8:18 AM, =CD=DF=EA=EF=F2 =C1=EB=E5=EE=FC=F0=EF=F5=EB= =EF=F2 wrote: > Also i have set: > ookie['ID']['expires'] =3D 60*60*24*365 #this cookie will expir= e in > a year The Expires attribute takes a date. If you're passing an interval in seconds then you should use the Max-Age attribute instead. That said, I think I misunderstood the problem initially. You are saying that when the user is on another site, and they press the browser's Back button to return to your page, your host is not recording a visit from the cookie you've given them? This is probably happening because the browser is not actually sending a request to your web server when it navigates back, unless the user specifically requests a refresh. Otherwise, most browsers will just use the cached page already in memory in this situation. As far as the server is concerned, nothing has happened.