Joomla! Discussion Forums



It is currently Sun Nov 22, 2009 8:33 pm (All times are UTC )





Post new topic Reply to topic [ 1 post ]
AuthorMessage
Posted: Thu Feb 21, 2008 11:12 pm
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Feb 01, 2007 7:15 pm
Posts: 8
I just run into a bug of Internet Explorer 6 (and most probably older Opera versions) that caused file not found errors on our user's systems.

I propose to take this into consideration for future Joomla releases for assuring backwards compatibility with older browsers.

Joomla Version 1.0.13

Symptoms:
  • User requests a dynamically generated file (e.g. PDF or Java Webstart JNLP file) through the index2.php no_html=1 pipe.
  • IE6 will start the appropriate program.
  • The program will fail due to the generated file not being found in the temporary internet files.

Reason:
IE6 has a bug when it comes to handling no-cache files.
Joomla uses the following header (code snippet taken from index2.php):
Code:
header( 'Expires: Mon, 26 Jul 1997 05:00:00 GMT' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Cache-Control: post-check=0, pre-check=0', false );
header( 'Pragma: no-cache' );


IE6 interprets this header in a way that it does not even store the file temporarily on the hard disk to be able to let another program open the file. The result is, for instance for Java Webstart, a FileNotFoundException when the program starts.

Solution:
The bad thing is, that you cannot replace this header with one of yourself even when you generate the file with the no_html=1 call. A header that would result in the wanted behavior would be:
Code:
// Date in the past
header("Expires: Mon, 27 Jul 1997 05:00:00 GMT");
// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// deprecated after 1 second
header("Cache-Control: max-age=1");

With this header, the browser would cache the file but would know to have to update it after 1 second (max-age).

To be able to use this header, you have, however, to alter the index2.php Joomla core file since it is not possible to replace a once stated header later on.

All browsers that I've tested (Firefox >2.0, Opera 6/9, IE6-7, recent Konqueror, recent Safari) did work with that setting.

Cheers,
Christopher


Top
E-mail
Display posts from previous: Sort by
Post new topic Reply to topic [ 1 post ]

Quick reply

This is not phishing, this is art!
Read more here what this is about.



Who is online

Users browsing this forum: No registered users and 7 guests


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
You cannot post attachments in this forum

Jump to:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group