Posts Tagged ‘programming’
18
Jan
I noticed this when I uploaded an entire project files from dev server to production server. Using Web Developer plugin for Firefox, I had a clue to compare the Content-Type from the response header and the one I have in <meta> tags in my HTML.
1 2 3 4 5 6 7 8 9 10 11 12 | Date: Wed, 25 Nov 2009 01:32:28 GMT Server: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.7 with Suhosin-Patch X-Powered-By: PHP/5.2.4-2ubuntu5.7 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Length: 6572 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Content-Type: text/html; charset=utf-8 200 OK |
And it was really it! Though they both have text/html, they had different character set values. Server responses with ISO-8859-1, but the <meta> instructs the browser to use utf-8, as it is declared in the document.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
And so the second load of page occurs, its sort of trying to correct page encoding on the client-side. In the script I was working, I needed to pass some session values to the next page and clear it on page load, but when it reloads the second time, the session value had been emptied.
Hope it helps.


