General Community > Scripting Help

javascript or php refresh

(1/3) > >>

Seph|roth:
can someone tell me if it's possible to make a page refresh only one time when it's loaded?

I want this to happen for this reason:

One of my sites has a php print-page script. All browsers work fine with this, except for opera. Opera keeps showing the first page on which it is used, even when the print-page command is triggered from another page (a cache issue perhaps?). The window has to be reloaded for opera to display the right page.

Thanks!

Aquilo:
I don't know which is better I posted something about php refresh like
Header ("Refresh: $admin_setting_ref_count; URL=$cgi/stuff");

and [Unknown] said Location is better, I don't know if it has bad side effects
or depends on it use but that or just a regular http header redirect, but if you
want you could make it refresh once like this!!!

<?php
if (!$_GET["refresh"]){
Header ("Refresh: 0; URL=/url/printscript.php?refresh=1");
}
?>

hope this helps!!!

Seph|roth:
uhm...  and where exactly do i put this?

not a php expert ;)

Aquilo:
at the top of the print page befor any output!

Seph|roth:
yes, i tried that ofcourse, but the page closes automatically when i do that... that's why i asked ;)

Navigation

[0] Message Index

[#] Next page

Go to full version