|
Posted by Csaba Gabor on 11/28/05 17:06
Besides the comments of Alvaro on cacheing, you can see some additional
comments at http://php.net/imagecreatefrompng.
Another technique some people use (which I don't recommend for
production, but may be OK for testing) is to append a dummy query
string to the end of the main page with a random component: "?rubbish="
+ randomNumber(). This ensures that the page is not cached.
Csaba Gabor from Vienna
Andrew Clark wrote:
> Hello,
>
> I am 99% sure that the problem I am having is not PHP related, but to
> remove my doubt, I am posting here.
>
> I have a search page (interfacing with MySql) that displays results in an
> IFRAME on the search page. I did this so the whole page would not have to
> be reloaded on each query.
>
> Each time I query the DB, I write the result set to a file and include this
> file as javascript source on the results page. Up to this point everything
> works fine, which is why I say I don't think this is PHP related.
>
> I use javascript to "walk" the recordset. In internet explorer (only), the
> first query recordset is all that is ever seen by the search page, even
> though the javascript source file is correctly generated. Maybe this is a
> little opaque so I will give an example.
>
> search.html
> --
> <IFRAME NAME="dataiframe" SRC="blank.html"></IFRAME>
> [...]
> <FORM ACTION="display.php" METHOD="post" TARGET="dataiframe">
> <INPUT TYPE="submit">
> </FORM>
>
> display.php
> --
> session_start ();
> $filename = "tmp/" . session_id () . ".js";
>
> // write recordset...
> // include here
> echo "<SCRIPT TYPE=\"text/javascript\" SRC=\"$filename\">
>
> --
> This file is always generated correctly. The problem arises when the
> browser (IE) does not use the updated values in $filename. It is my belief
> that IE caches the values in this file and when the frame is reloaded, IE
> tries to be "smart" and sees that I am including the same file, and
> therefore does not reload from the file but from its cache.
>
> Now that I think about it, since the file is being correctly generated,
> this is 100% NOT PHP related. Could someone shed light on this anyway? It
> would be much appreciated.
>
> Thanks,
> Andrew
[Back to original message]
|