Note that there are some explanatory texts on larger screens.

plurals
  1. POBrowser: Cookie lost on refresh
    primarykey
    data
    text
    <p>I am experiencing a strange behaviour of my application in Chrome browser (No problem with other browsers). When I refresh a page, the cookie is being sent properly, but intermittently the browser doesn't seem to pass the cookie on some refreshes.</p> <p>This is how I set my cookie:</p> <pre><code>$identifier = / some weird string /; $key = md5(uniqid(rand(), true)); $timeout = number_format(time(), 0, '.', '') + 43200; setcookie('fboxauth', $identifier . ":" . $key, $timeout, "/", "fbox.mysite.com", 0); </code></pre> <p>This is what I am using for page headers:</p> <pre><code>header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Thu, 25 Nov 1982 08:24:00 GMT"); // Date in the past </code></pre> <p>Do you see any issue here that might affect the cookie handling? Thank you for any suggestion.</p> <h2>EDIT-01:</h2> <p>It seems that the cookie is not being sent with some requests. This happens intermittently and I am seeing this behaviour for <strong>ALL</strong> the browsers now. Has anyone come across such situation? Is there any situation where a cookie will not be sent with the request?</p> <h2>EDIT-02:</h2> <p>Here are the HTTP Headers:</p> <blockquote> <pre><code>Request Method:GET Status Code:200 OK </code></pre> </blockquote> <p><strong>REQUEST HEADERS</strong></p> <blockquote> <pre><code>Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Referer:http://fbox.mysite.com/dashboard User-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1045 Safari/532.5 </code></pre> </blockquote> <p><strong>RESPONSE HEADERS</strong></p> <blockquote> <pre><code>Cache-Control:no-cache, must-revalidate Content-Length:8903 Content-Type:text/html Date:Tue, 06 Apr 2010 09:25:26 GMT Expires:Thu, 25 Nov 1982 08:24:00 GMT Last-Modified:Tue, 06 Apr 2010 09:25:26 GMT Pragma:no-cache Server:Microsoft-IIS/7.5 X-Powered-By:PHP/5.3.1 ZendServer </code></pre> </blockquote> <p>Thanks again, for any guideline.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload