A flaw, debugging with Google Chrome?
Today I discovered a flaw, conceptually, debugging a php site with google Chrome. This is not a bug as it is intentionally and by design. The problem arose after I had submitted a form to a php file and wrote some debug data out to the stream. All my values where there, in the top of my document via Php’s var_dump() function. The values wheren’t visible on the site and as I pushed vew source I was redirected to “view-source:www.mytestsite.com/test.php”. The values that i echoed from php where not in the sourcecode only my ‘test: ‘ string that I usually write to the reponse to make sure something comes out. I tried the same thing in firefox, pressed “view source” and found my test string written correct in the sourcecode: ‘test: email@example.com’. I went back to chrome and viewed the element via the dom inpector and found my values written correct in Chrome as well?! I pressed view source and they where gone again??!
It dawned on me that the values I was trying to write to the response, were fetched from the session object.
From there on, the only conclusion I could draw, was that Chrome loads the sourcecode of a page all over again when you wish to see the sourcecode, and as little extra feature you lose your session and cookie variables in the process?
Don’t get me wrong, I love Chrome it is the only browser I use, for development and browsing purposes. But I learned today that the dom inspector is the safest way to view the actual sourcecode of your current document. But I would have preferred Chrome handled this via cache as Firefox seems to.