views:

137

answers:

2

I have some js file generated with php., name by example "my_file.js.php", served with appropriate content-type for JS.

In FF, IE7, Chrome, etc.. all works fine, these files are correctly loaded.

But, in IE6, ths is more complicated : - first load of the page : file is not loaded, and consequently, I have some JS errors on my page - If I did a page refresh, all is now ok

Did anyone of us experience some strange behaviour like this ? (it seems clearly linked to the fact the files are not "pure" .js files, because my other .js files are correctly loaded.

A: 

Well, it's hard to say without the source, but maybe you could try putting the defer attribute in your script. That way your script might get loaded after the body, circumventing the error.

Veer
+1  A: 

I got it !

After all, the problem was not linked to JS.. but my PHP.

I have a call to "session_start", and it seems that the "no-store" header sent by this call was no very well managed by IE6.

I added a session_cache_limiter('none'); before my call to session_stat and all is now OK.

For french speakers, here is some informations : http://www.developpez.net/forums/d619691/php/langage/sessions/header-session%5Fstart-sous-ie/#post3691413

kemar