Page 1 of 1

session variables, cache and (mac) Internet Explorer 5.2

Posted: Wed Apr 14, 2004 12:03 pm
by kpegram
Hi,
To be able to repopulate form fields when a person uses the back arrow, I'm using session variables. For (mac) IE 5.2, even though the session variables have the correct values and the html source code has correct values and syntax (ie checkboxes checked) the front-end HTML is incorrect. Even refreshing the browser multiple times, the code doesn't show up correctly. The code works on (mac) netscape 7.1.

I'm not certain, but I thought this might have something to do with cache, so I tried adding different headers to my script:

<?
session_start();

Header("Cache-control: private, no-cache");
Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); # Past date
Header("Pragma: no-cache");

This didn't help! Can you help?

Posted: Wed Apr 14, 2004 2:04 pm
by pickle
Does the HTML look incorrect, or is the source code incorrect?

Posted: Wed Apr 14, 2004 2:19 pm
by kpegram
Thanks for your response. Actually, they're both correct. What's happening is when you look at view source from the browser, the HTML code for the checkbox is correctly generated using the session variables, but when you look at the generated web page it's appearing differently (ie a checkbox that should be checked isn't and vice versa).

To verify the HTML was correct, I copied the checkbox code from view source into a new document and it appeared the way it should have... What's wierd is that this is working in (mac OSX) Netscape, but not in IE!

Posted: Wed Apr 14, 2004 2:26 pm
by pickle
So..... the code that you see when you view source in IE, doesn't match up with what is actually being displayed. This only happens in IE, and not in Netscape. Sorry if it's taking me a while to understand, but this seems really messed up.

Posted: Wed Apr 14, 2004 2:33 pm
by kpegram
I agree! That's why I was thinking it might have something to do with cache??

Posted: Wed Apr 14, 2004 2:36 pm
by kpegram
sorry, I forgot to mention, the code is doing what you say.

Posted: Wed Apr 14, 2004 2:37 pm
by pickle
I assume you've emptied the cache and all? I've noticed sometimes with IE, you have to catch it acting up before it'll actually admit it. Try removing the page entirely and go to it's address. Then IE should pop up a 404 error. Empty your cache before and after you do this. When you're done, put the page back, visit it and see what happens.

Posted: Wed Apr 14, 2004 2:53 pm
by kpegram
Yes, I had emptied the cache. I tried your suggestion and got the 404 error, emptying cache before and after. I put the page back and I still get the same results. :?

Posted: Wed Apr 14, 2004 3:36 pm
by pickle
Well, after all that discussion, I don't know what to say. Does the source from IE and Netscape match up? I have a pretty big hatred for IE on Mac. It was never supported well and is a shoddy product. It's entirely possible that this is just something that cannot be fixed from your side (although I hate saying that). One other thing would be to double, triple, and quadruple check the source code against the page. Maybe output some flags to make sure you're matching up the right section of code with the right area on the page. Beyond that I'm not really sure what to do here.

Posted: Wed Apr 14, 2004 4:00 pm
by kpegram
I'll do some source checking to see if I can pinpoint anything. I'll let you know if by some chance I get it working on Mac IE... Thanks for all your help, pickle!

Posted: Wed Apr 14, 2004 6:11 pm
by pickle
Try it on other Mac browsers - Camino, iCab, Omniweb, and Safari and see what they do. Camino and Safari uses the same Gecko core as Mozilla and Firefox, but as far as I know, iCab and Omniweb are their own. They might show something interesting.