in addition use meta tag to make it no-cache
Main Topics
Browse All TopicsHi
I got a captive portal program that I setup myself as it was the only one that worked well for my own needs.
It works in the following fashion
Client on LAN --> Gateway with webserver --> Internet
1- User enters office and requests www.google.com
2-Gateway intercepts and redirects to local webserver, the user gets a policy agreement. He presses ok and he gets a message stating that he will get redirected to www.google.com in 5 seconds. However when he gets redirected the browser redisplays the policy page. The same happens if I enter www.google.com into the browser address bar. It works after doing ctrl + F5.
In short I want the browser to get the page from the server and not used the locally cached version.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
If possible this should be done with PHP. This code should be at the VERY TOP of your policy agreement page:
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
if (empty($_GET)) {
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PH
$extra = '?request=true';
header("Location: http://$host$uri/$extra");
exit;
}
?>
I did add that and got headers alrady sent out..this is a killer...I did get the code pasted it into notepad++ removed all whitespace then pasted it into vi on the server and saved it and stil lsame error.
Warning: Cannot modify header information - headers already sent by (output started at /var/www/index.php:3) in /var/www/index.php on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/index.php:3) in /var/www/index.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at /var/www/index.php:3) in /var/www/index.php on line 10
<html>
<head>
<?php
#header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
#header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
#if (empty($_GET)) {
# $host = $_SERVER['HTTP_HOST'];
# $uri = rtrim(dirname($_SERVER['PH
# $extra = '?request=true';
# header("Location: http://$host$uri/$extra");
# exit;
#}
#?>
<META HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT">
#<?php
#header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" );
#header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
#header( "Cache-Control: no-cache, must-revalidate" );
#header( "Pragma: no-cache" );
#?>
<?php
// Date in the past
#header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// always modified
#header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
#header("cache-Control: no-store, no-cache, must-revalidate");
#header("cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
#header("Pragma: no-cache");
?>
<?php $URL = "http://".$_SERVER['SERVER
<script type="text/javascript">
<!--
function delayer(){
window.location = "<?php echo $URL ?>"
}
//-->
</script>
Business Accounts
Answer for Membership
by: MuraliKanthPosted on 2009-06-12 at 02:38:00ID: 24610510
try having empty onunload() method {}
window.onunload=function()