Link to home
Start Free TrialLog in
Avatar of gcmachel
gcmachel

asked on

HTM/PHP refreshing problem

Hi,
I have a HTM file and PHP file. HTM file is actually redirected from PHP file. so in my PHP code says that

  header("Location: rich.htm?reportname=" . $_GET["reportname"]);

So rich.htm is a file where we have two IFRAMES where we load two HTMLS which we have created already, the problem here is when we load the IFRAME with the HTMLS created its being cached. When i do a CTRL+Refresh it loads the content properly.

to avoid this CTRL refresh where should i keep the code in PHP / HTML, in either case what is the code?

Regards,G.
Avatar of sypder
sypder

Give this a try:

header("Location: rich.htm?reportname=" . $_GET["reportname"] . "&rtime=" . time());

You can also try adding this to your HTML code:

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
Another HTML tag to try is:
<HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
Sorry: <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
Avatar of gcmachel

ASKER

No Guys it didnt worked out. I am not sure why? Is there anyway we can make the IFRAMES to refresh its contents when its loading. This is what i am doing with IFRAME

<iframe class="mytext" width="100%" ID="mytext" height="200" src="temp/curr_temp.htm"></iframe>

So let me know what can be done in IFRAME as the above mentioned methods didnt worked.

many thanks,G
Try:

<iframe class="mytext" width="100%" ID="mytext" height="200" src="temp/curr_temp.htm<?php echo "?rtime=" . time(); ?>"></iframe>
Hi Sypder,
It was nice with you. It worked well. I am going to give you the whole points. Also will you please take your time to explain what it does. I am keen to know what does that PHP code likely to do in that place.
Many thanks in advance.
Regards,G.
ASKER CERTIFIED SOLUTION
Avatar of sypder
sypder

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the input.
Regards,G.