session variables, cache and (mac) Internet Explorer 5.2
Moderator: General Moderators
session variables, cache and (mac) Internet Explorer 5.2
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?
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?
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!
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!
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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.