473,327 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

browser / refresh

is there any way to force a refresh of a page that a user visits??
sorry i am still learning.

vickie
Jul 17 '05 #1
4 2110

"vickie_raven" <vi**********@hotmail.com> wrote in message
news:d7********************************@4ax.com...
is there any way to force a refresh of a page that a user visits??
sorry i am still learning.

vickie


Setting the appropriate metatag should do it. But do it in PHP, or I'll have
to have you ejected from the group:

<?php
echo '<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">';
?>

Garp
Jul 17 '05 #2
Garp wrote:
"vickie_raven" <vi**********@hotmail.com> wrote in message
news:d7********************************@4ax.com...
is there any way to force a refresh of a page that a user visits??
sorry i am still learning.
Setting the appropriate metatag should do it. But do it in PHP, or I'll have
to have you ejected from the group:

<?php
echo '<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">';
?>


If that is what vickie really wants why not send HTTP headers instead?

<?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");
?>

--
USENET would be a better place if everybody read: : mail address :
http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
http://www.expita.com/nomime.html : to 10K bytes :
Jul 17 '05 #3
vickie_raven wrote:
is there any way to force a refresh of a page that a user visits??


No. Forget "force".

--
Jock
Jul 17 '05 #4
On Fri, 28 May 2004 16:29:48 -0400, vickie_raven <vi**********@hotmail.com>
wrote:
is there any way to force a refresh of a page that a user visits??


You could dispatch goons to the user's house to threaten them with big sticks
until they hit refresh. Otherwise, you're pretty much out of luck as far as
forcing goes.

Since PHP's job is finished once the page is sent to the user, you can't later
do anything that could cause a refresh.

You could send a Location header along with the page, but that just redirects
instantly, and so the user would never see the page in the first place - hardly
a refresh.

An HTML solution (independent of PHP) is using a <meta> tag to request the
browser to refresh after a certain amount of time. The browser doesn't have to
honour this request.

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chumley the Walrus | last post by:
Is there a method in onClick event to refresh the browser. I'd like to have users click on a link to listen to a streaming audio feed, but at the same time as the click, refresh the browser so that...
19
by: Jay | last post by:
I'm trying to refresh browser when some new information is available in DB. is there any way to force to refresh browser? Thanks. -Kev
14
by: Shiperton Henethe | last post by:
Hi Is there anyway to get a meta refresh to do so in an new browser window? e.g. This code forwards this user after 8 seconds... <meta http-equiv=refresh...
1
by: Matt | last post by:
When we refresh the page (F5, or icon in browser), it will first trigger ONUNLOAD event and then trigger ONLOAD event. When we close the browser (X on right top icon), it will trigger ONUNLOAD...
7
by: milkyway | last post by:
Hello to all ;-) I am using the Visual Studio 2005 .NET framework. Basically, I have file that is served up as an HTML file on the client side (generated from a .aspx file). But - the HTML...
0
by: Brad White | last post by:
Overview: I have a custom web app that has an 'Inbox' that refreshes every 30 seconds. One user uses Outlook to host the web page. Using IE, the refresh works fine. If the user is working in...
4
by: Joseph | last post by:
I know about writing CGI application using Perl and Apache to refresh a static webpage that displays on the browser. But now i have an application requirement that I hope someone can help me. ...
15
by: tshad | last post by:
I was looking for a way to handle refreshes (user pressed refresh button) and found a piece of code to check if a Web page was refreshed but I can't get it to work. The code is:...
10
by: Bill Nguyen | last post by:
I would like to be able to get an active browser window to refresh the URL (reload) every 5 minutes. Is it possible in VB.NET? Thanks Bill
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.