473,513 Members | 6,210 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Force reload of changed page?

I'm not sure if this is the right group, but I thought the solution may
be JS related, hence my post.

I've got a web site that is frequently updated; yesterday several
subscribers contacted me to say they couldn't see the update. I suspect
this is a cache problem, so is there a way to force a page to be
reloaded when it is changed. I realize it is too late for the current
pages, but I'd like to include something later.
--
Nige

Please replace YYYY with the current year
ille quis mortem cum maximus ludos, vincat
Jul 20 '05 #1
3 17721
Nige,
Don't think this is a JS question really, always useful to use search
engines to see if you can find the answer first. But try:-

<META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

it may help. Otherwise I know you can defo do it server side with asp
using:-

response.expires = 0

Hope that helps

Stu
"Nige" <uY***@ntlworld.com> wrote in message
news:7v********************************@4ax.com...
I'm not sure if this is the right group, but I thought the solution may
be JS related, hence my post.

I've got a web site that is frequently updated; yesterday several
subscribers contacted me to say they couldn't see the update. I suspect
this is a cache problem, so is there a way to force a page to be
reloaded when it is changed. I realize it is too late for the current
pages, but I'd like to include something later.
--
Nige

Please replace YYYY with the current year
ille quis mortem cum maximus ludos, vincat

Jul 20 '05 #2
In comp.lang.javascript, Stuart Palmer wrote:
<META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">


Thanks, but I didn't really explain properly. I want to make sure that
my web content is reasonably current, but at the same time I don't want
to bypass caching completely.

I'm looking for a way to cache a page for 24 hours after a user accesses
it, but if they come back after that time, then reload the page.

I understand using HTTP headers, rather than META tags, is the best way
for maximum compatibility.

I've seen a few scripts in something called PHP, but I don't think I can
use this on my site.

Can anyone help, or offer an alternative?
--
Nige
--
Nige

Please replace YYYY with the current year
ille quis mortem cum maximus ludos, vincat
Jul 20 '05 #3
Nige wrote:
In comp.lang.javascript, Stuart Palmer wrote:
<META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
Thanks, but I didn't really explain properly. I want to make sure that
my web content is reasonably current, but at the same time I don't want
to bypass caching completely.


"Wash it but don't make it wet." ;-)
I'm looking for a way to cache a page for 24 hours after a user accesses
it, but if they come back after that time, then reload the page.


Only server-side scripting can provide that reliably. You need the script
to set the Expires HTTP header and the `meta' element according to the
current date, i.e. the date the user accesses the document.
PointedEars
Jul 20 '05 #4

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

Similar topics

3
2355
by: Ike | last post by:
Suppose I have a frame like 123bottom.html and within it, I want to promt the user for a response (in the <HEAD>) like var ans = prompt("What is your name?"); and then reload the page (via,...
1
1126
by: simon | last post by:
When I press shortcut key F5 (Debug.startWithoutDebugging) I always get a page on a new instance of Internet explorer. So then happens that I have 10 or more opened windows. Is it possible to...
10
1656
by: riversmithco | last post by:
This should be easy, How do I reload a page so that it makes the server think it's the first time the page has been loaded? Thanks
0
1149
by: tshad | last post by:
I am having a problem with a page that loads a user control that absolutely must reload if there are errors on the page. But if you have IE set to never check for newer versions of the page, it...
8
6728
by: T. Wintershoven | last post by:
Hi all, Is there a simple way in php to reload a page coded within an if statement.(see code below) It's very important that the session stays intact. The filename is RCStudent.php ...
7
29630
by: J055 | last post by:
Hi I have a list on LinkButton controls on a page. When the link is clicked the LinkButton.Command event does a Server.Transfer to a page which writes binary to the HTTP output stream, e.g. a...
1
1964
by: GD | last post by:
I need a script to open a popup window which contains a php form. after the form has been submitted or cancelled i need to go back to the originated page (php also) and reload original page. do...
1
2631
by: jobs | last post by:
Hello. I have asp.net menu with a logout item. I handle the the menu click as follows: Protected Sub Menu_MenuItemClick(ByVal sender As Object, ByVal e As...
1
3460
by: apssiva | last post by:
Hello All, 1. First i select the class name in combo box -> using jQuery reload the page. 2. after reload the page, Student name was display in random. so i add two radio button. 1....
0
7254
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.