Lyrics & Knowledge Personal Pages Record Shop Auction Links Radio & Media Kids Membership Help
The Mudcat Cafesj

Post to this Thread - Sort Descending - Printer Friendly - Home


Tech: Websites - forcing a page refresh

Joe Offer 02 Mar 09 - 07:25 PM
Bill D 02 Mar 09 - 08:05 PM
Bill D 02 Mar 09 - 08:09 PM
Nick 02 Mar 09 - 08:10 PM
Nick 02 Mar 09 - 08:17 PM
Bill D 02 Mar 09 - 08:30 PM
Joe Offer 02 Mar 09 - 08:36 PM
Bill D 02 Mar 09 - 08:45 PM
Joe Offer 02 Mar 09 - 08:54 PM
olddude 02 Mar 09 - 09:42 PM
olddude 02 Mar 09 - 10:20 PM
Bill D 02 Mar 09 - 10:58 PM
JohnInKansas 03 Mar 09 - 12:07 AM
treewind 03 Mar 09 - 03:09 AM
Joe Offer 03 Mar 09 - 03:24 AM
treewind 03 Mar 09 - 06:55 AM
Mr Red 03 Mar 09 - 07:03 AM
The Borchester Echo 03 Mar 09 - 07:27 AM
The Borchester Echo 03 Mar 09 - 07:34 AM
GUEST 03 Mar 09 - 09:22 AM
Simon G 03 Mar 09 - 01:26 PM
Sawzaw 03 Mar 09 - 02:41 PM
Sawzaw 03 Mar 09 - 05:55 PM
Share Thread
more
Lyrics & Knowledge Search [Advanced]
DT  Forum Child
Sort (Forum) by:relevance date
DT Lyrics:





Subject: Tech: Websites - forcing a page refresh
From: Joe Offer
Date: 02 Mar 09 - 07:25 PM

As I've said before on these pages, I maintain a website for Wellspring Women's Center, the women's center where I do volunteer work. I certainly wouldn't call myself an expert at HTML, but I get by pretty well, with a little help from my friends.

Well, now I need some help. Our Website host changed things over on us recently, and lately I've noticed that when I update a page and go to it, the page appears in my browser without the changes I worked so hard to make. It took me a while to realize that my browser was loading a stored version of the page, instead of the new version.

Is there a tag I can put on pages that will force browsers to load the new version of the page?

-Joe-


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Bill D
Date: 02 Mar 09 - 08:05 PM

Joe... the site Reference Desk seems to do just that. I do not know how.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Bill D
Date: 02 Mar 09 - 08:09 PM

I do see the code at the beginning of the site has 'refresh' in it... view source


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Nick
Date: 02 Mar 09 - 08:10 PM

Refresh

I've come across the pragma one again but the other is new to me


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Nick
Date: 02 Mar 09 - 08:17 PM

On the refdesk site it has in the HEAD section (chevron}meta http-equiv="refresh" content="300"(close chevron) which means that the site should refresh every 5 minutes (300 seconds) if you return to it.

It doesn't refresh if you are on it


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Bill D
Date: 02 Mar 09 - 08:30 PM

Ok...a good plan. Anytime you log on, it refreshes....which is what it does every morning for me.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Joe Offer
Date: 02 Mar 09 - 08:36 PM

We were having the problem at Mudcat, and Jeff did something to fix it - so you'd think the Forum Menu would have tags to do that, but I can't find anything.

-Joe-


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Bill D
Date: 02 Mar 09 - 08:45 PM

"fix it"?? I dunno...Mudcat never refreshes for me, except by the settings in my browser(s).


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Joe Offer
Date: 02 Mar 09 - 08:54 PM

Bill, when you go to the Forum Menu or to a thread you've visited before, don't you get the most recent posts? At one time, going to the Forum Menu or a thread, took you to the last time you saw it.
It was Jeff who fixed that....or maybe it was Max - but I remember the night they did it, and it was fixed very quickly.
-Joe-


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: olddude
Date: 02 Mar 09 - 09:42 PM

refresh


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: olddude
Date: 02 Mar 09 - 10:20 PM

see post above on link refresh
JavaScript Refresh
The preferred page refresh/reload method uses a JavaScript technique that will replace the current page with each refresh in the visitor's page history.

This version uses an under-utilized method of dealing with cross browser and old version browser compatibility. It defines multiple JavaScript code blocks, where each JavaScript version block redefines the same function. Only the last version block that is supported by the browser will be used. So older browsers will use the "JavaScript" block, while later browsers will use either the "JavaScript1.1" or "JavaScript1.2" block depending upon the browser's capabilities. If the browser does not support JavaScript or has it disabled, the "noscript" block will be used.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Bill D
Date: 02 Mar 09 - 10:58 PM

Joe... something special may have been wrong at Mudcat for awhile,and Jeff fixed that.

The refresh/reload issue is different. It is possible for me to sign on, look at 2 or 3 threads, sign off again, and sign back on an hour later to find the same status as when I signed on the first time. In fact, because strange 'ol me has 8-9 different browsers parked on my HD, I have opened one after 10 days or 6 weeks, and find the same configuration. This is a side-benefit (or problem) that arose when browser teams developed "session saving" technology. That is, I can close the browser without closing any particular tab...or set of tabs, and find 3,4,8....or 15 .... websites exactly as I left them.
Then,,,while I am online, the browser settings for how often any site I am actively reading refreshes kick in, and new copies of that (or those) sites will be cached according to the rules *I* have chosen.
That is why, when I lose a post here at Mudcat, I know that for some reason, hitting 'refresh' at the top of Mudcat has brought me an old copy from the cache....that is when, I have learned, I can manually get a new copy into the cache and my post will not be lost.

(That is as close as I can come to explaining what I think is happening. As I say, I don't know exactly why, technically, this works...but I do know that, practically, it does...and that I can stop lost posts by using the 'back' button in my browser and copying my last post and re-posting it after a reload.

Modern browsers have lots of tricks...tabbed browsing and session saving are a couple which complicate the refresh/reload issue, I guess.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: JohnInKansas
Date: 03 Mar 09 - 12:07 AM

Joe -

The problem you describe may be more in your own browser than anything on the website. You can set preferences in most browsers to always look for a new version everytime you connect or change pages, all the way to always look for a saved version first.

In Internet Explorer, Tools|Internet Options, on the "General" tab there's a section for "Browsing History" with a "Settings" button. One of the options under "check for new version:" is "every time I visit a page."

That used to be my preferred choice, when I had some rare cases of the page not updating. My current setting is just "automatic" and that seems to work well enough in IE7 (on Vista). I don't know when my setting got swapped, but there have been numerous updates and patches since I looked last.

If you're using one of the other browsers, you may have to download an accessory or an add-on, but at least some options should be available in any browser.

A web site that forced an update if I'd set a different behavior in my own browser would be immediately suspected of having been "hacked" - with the forced update being a common vehicle for "pushing" malware that's been recently wormed into the site.

Most sites should offer only the "latest" page version. If you see an older version it should be coming from Temp files on your own machine. I see a couple of sites that update frequently when I'm in the middle of looking at them, but I suspect that it's because the "automatic" setting in my browser detects the newer page, not because the site "pushes" the update. (MSNBC news is notable for changing the front page every few minutes - sometimes.)

John


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: treewind
Date: 03 Mar 09 - 03:09 AM

I think this is what you need:
In the <HEAD> section of your page:

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

This is the equivalent of a sever sending a "Cache-control: no-cache" header, and tells the browser not to store the page in its local cache, so next time you load the page it must come direct from the web server.

It's a bad idea to overdo this, as caching of pages saves a lot of server time and bandwidth.

---

There's a whole lot of other cache settings that can be set, like expiry times. (either a time and date, or some thing like "expire after 300 seconds")

The "refresh" thing is different - that makes the browser reload the page at intervals without your doing anything. It's useful if you have live data that updates every few seconds, but it can put one hell of a load on the server if a lot of people are watching it at once. You can also use the refresh to load a different page, which is used for those "this will automatically redirect in 10 seconds" type messages

Anahata


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Joe Offer
Date: 03 Mar 09 - 03:24 AM

Well, I'm still not getting it. This seems to be something very common, and constantly-updated pages like Mudcat seem to handle it very easily, without scripts.
Let's put it this way: why does a new copy of the Forum Menu load, every time I go to Mudcat? Why don't I get the previous Forum Menu, the one that is cached on my computer?
And if my browser loads a new Mudcat page every time, why won't it load the latest version of a page from the Women's Center? Note, however, that the Mudcat Auction does not automatically load the most recent page version. What's the difference between regular Mudcat pages, and auction pages?

-Joe-


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: treewind
Date: 03 Mar 09 - 06:55 AM

Sometimes there's a proxy server between you and the actual web server. In that case META http-equiv tags won't do the trick; the server must send out http responses with real headers (which the proxy will see) that disable caching. Also there are several mechamisms for cache control and not everything takes notice of all of them so you need a belt-and braces approach -
cache-control : no-cache
expiry time (sometime in the past)
pragma: no-cache

To get these headers out you need to do server side scripting. In PHP it's the header() function, for example.

Anahata


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Mr Red
Date: 03 Mar 09 - 07:03 AM

This was my next project.
There is a reason and my next thread will explain in more detail.

Anahata - is you saying it can't be done in JavaScript? ie client side.

I will ask the question on javascript.com

(PS having problems posting on a public (library) PC and there definitely are proxy servers - one of them is a UK gov snooper - and the browser a remote too)


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: The Borchester Echo
Date: 03 Mar 09 - 07:27 AM

For quite a while now, absolutely nothing refreshes automatically, even pages which clearly state that they will every x number of minutes. But they always used to.

I had a theory that this started when I went over to Camino but I've since tested it on lots of different browsers and the problem persists. People might remember that my reason for installing Camino was when Safari became extremely sick and refused to load. It's still there, sulking on the desktop doing nothing.

Can't find anything in View / Source to change preferences. How do you find out if a spy proxy server's in the way? Can you get the ISP to zap it?

I'm running Mac OSX 10.3.9 and Camino 1.6.3


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: The Borchester Echo
Date: 03 Mar 09 - 07:34 AM

On second thoughts, that's not wholly accurate.
Mail sometimes refreshes all by itself, if it feels like it.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: GUEST
Date: 03 Mar 09 - 09:22 AM

Does this help.

http://www.mnot.net/cache_docs/


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Simon G
Date: 03 Mar 09 - 01:26 PM

Sorry I became a guest against my will.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Sawzaw
Date: 03 Mar 09 - 02:41 PM

Joe:

Have you checked out the target= code in the url? It does not necessarily apply to frames. See:

http://www.htmlcodetutorial.com/linking/_A_TARGET.html

Also there is

onClick="return targetopener(this,true,true)"

But I forgot exactly how to use it.

Both are HTML and require no Java or scripts or CSS.


I notice you don't have a custom icon for the url box.

If you want one create animage, convert it to .ico format

http://www.chami.com/html-kit/services/favicon/

and up in the header put:

<link rel="shortcut icon" href="../b/favicon_mudcat.ico">


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: Websites - forcing a page refresh
From: Sawzaw
Date: 03 Mar 09 - 05:55 PM

Joe:

I misread you original post.

Try this in the header:

<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">


Post - Top - Home - Printer Friendly - Translate
  Share Thread:
More...

Reply to Thread
Subject:  Help
From:
Preview   Automatic Linebreaks   Make a link ("blue clicky")


Mudcat time: 7 May 12:06 PM EDT

[ Home ]

All original material is copyright © 2022 by the Mudcat Café Music Foundation. All photos, music, images, etc. are copyright © by their rightful owners. Every effort is taken to attribute appropriate copyright to images, content, music, etc. We are not a copyright resource.