| Page 2 of 3 | [ 27 posts ] | Go to page Previous1, 2, 3 Next |
|
IE is well known for excessive caching, I find that the following headers on the server side help discourage IE:
header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Content-type: application/json; charset=utf-8'); The last one is just for JSON data. This usually convinces IE not to cache the information. |
|
Yes, correct.
But concerning: header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 I tried this already, but it did not change the behavior of MSIE. PLUS: If I use this header in Firefox it messes up the unset of some session variables. IF I log out with: unset($_session['user']) // (example) header('location: somepage.html'); THEN pushing on the back button of FF will get me back on the session-protected page... (that is the page where I logged out from.) This is the log out function I use Code: // logout the user function userLogOut(){ unset($_SESSION['loggedin']); header("location: ".ROOT_URL."/index.html"); } And this is the function I use to set the session (on boot of the page) Code: function initSession(){ ini_set("session.use_trans_sid", false); ini_set('url_rewriter.tags', ''); $time = 3600; session_set_cookie_params($time); // start session session_start(); session_regenerate_id(); //delete_old_session $newSession = session_id(); session_write_close(); session_id($newSession); session_start(); // } ps: but of course that is a completely different discussion... UPDATE: header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); this seems to do the trick in FF... |
|
Is it safe to assume that if I want to use YUI in a production environment that users must be encouraged to use FF, Safari, whatever, as long as it isn't MSIE?
|
|
No, not at all. YAHOO uses YUI on its own site and its open to every sort of browser. You have some problem somewhere which is not evident in the segments of code you show, much less without formatting.
|
|
The complete code of the page with the datatable is here:
http://pastie.org/pastes/718378 |
|
Could the problem be timing related?
Maybe the loading sequence is different between browsers. |
|
I was about to suggest the same. Seeing all the calls to asyncRequest I believe so, that would also explain why sometimes it works in IE, when the reply is cached, the timing is completely altered. Use the logger utility to show you what happens when and see if that fits with what you meant. You won't be able to use breakpoints or alert boxes to find out because that would also alter the timing.
|
|
I think I have found the trigger of the problem, but I don't know how to solve it yet.
With YAHOO.log I have noticed a variation in timing between the formatter and my custom DropdownCellEditor (of the same key). In Safari and FF the custom editor mostly triggers first, but sometimes (1/20) the browser reacts like Explorer by loading eternally (MSIE always triggers the formatter first). This is the LOG on succes (bottom to top): Code: INFO 108ms (+0) 20:36:20 GMT+01:00: global listofusers[posnum].label in formatter: Verified users INFO 108ms (+0) 20:36:20 GMT+01:00: global posnum in formatter: 2 INFO 108ms (+0) 20:36:20 GMT+01:00: global listofusers[posnum].label in formatter: Everybody INFO 108ms (+22) 20:36:20 GMT+01:00: global posnum in formatter: 0 INFO 86ms (+65) 20:36:20 GMT+01:00: global listofusers[0].label in Custom Editor : Everybody INFO 21ms (+21) 20:36:20 GMT+01:00: LogReader instance0 LogReader initialized INFO 0ms (+0) 20:36:20 GMT+01:00: global Logger initialized This is the LOG on failure: Code: INFO 142ms (+26) 20:35:28 GMT+01:00: global listofusers[0].label in Custom Editor : Everybody INFO 116ms (+89) 20:35:28 GMT+01:00: global posnum in formatter: 0 INFO 27ms (+27) 20:35:28 GMT+01:00: LogReader instance0 LogReader initialized INFO 0ms (+0) 20:35:28 GMT+01:00: global Logger initialized |
|
By the way:
Does anybody knows what this error (in JSLint) means: Implied global: YAHOO 1,3,43,45,49,56,61,88,90,95,98,107,112,155,158,159,160,171,177,182,212,219,224,260,262,283,290,295,317,322,332,333,342,419,428,441,470, escape 14,76,127,197,239,310, alert 65,70,116,121,186,191,228,233,299,304,451 |
|
that you have variable YAHOO as a global variable in your code. its not an error...
|
| Page 2 of 3 | [ 27 posts ] | Go to page Previous1, 2, 3 Next |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© YUI Library - Site Credits
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group