When writing a little script that returns dynamic content for your AJAX webapp, remember this:
You must include the "Cache-Control: no-cache" header if it's gonna be used with Explorer.
'Cause IE8 thinks it's a dandy idea to cache responses to XMLHttpRequest. Even if the URI has a clue to dynamicality, like one of those question-mark thingies used to set off parameters passed to scripts. And if it's got a response cached, there's no point making the request again. Which makes the dynamic content not work, and also makes the control functions only work once each.
Now that that's fixed, the toaster's embedded web interface works with all the modern-ish browsers that I have handy. Except for the minor detail that setting the background color of table cells in JavaScript doesn't seem to work in IE, so the indicator lights are out of commission. One more ferschlugginer detail....
Update: heeeere we go. Seems the bgcolor attribute has been deprecated into semi-oblivion in IE8. If you set it in the HTML, it works. If you set it in JavaScript, with
e.setAttribute("bgcolor", b.color);
it changes the bgcolor attribute displayed by the Developer Tools, but doesn't actually change the displayed color.
What actually works (tested in IE8 and Firefox, so far) is
e.style.backgroundColor = b.color;
Update 2: huh. Now it's not working with Konqueror. I thought that used to work... but now that it's working in IE, FF, and Galeon, Konqueror is completely failing to update its display (though the function buttons are sending the applicable commands to the toaster). Oh, well: the customer probably isn't using Konqueror, so sorting it out can wait until some other day.
Comments