You are here: Re: Generated file « PHP Programming Language « IT news, forums, messages
Re: Generated file

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация