| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 23264 | 2002-08-11 09:44:00 | Is there anyway to force a page to reload from the server using HTML code? | Graham Petrie (449) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 70232 | 2002-08-11 09:44:00 | Hi, Playing around with a site with frames. Is there anyway to force the browser to read the page loaded into the frame from the server and not the cache? ie force the frame to perform a ctrl+F5 on itself when it is loaded by coding the HTML. I know browser settings can be changed to do this, but what about a specific page? Maybe a java script? G P |
Graham Petrie (449) | ||
| 70233 | 2002-08-11 10:00:00 | I know you can do it client side with ColdFusion or ASP. To create a re-direct in HTML you use meta tags. Don't know if this will work for refreshing from server though. The code to re-direct is: <meta http-equiv="Refresh" content="10; URL=http://www.pressf1.co.nz"> (Waits 10 sec then loads the page) |
Heather P (163) | ||
| 70234 | 2002-08-11 10:06:00 | Thanks Heather - already tried that. Just refreshes from the cache, and you get a refresh loop of however long the delay is. Have also tried setting the expiry date of the page in the past, and adding a <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> tag. Not working yet. Any other ideas? G P |
Graham Petrie (449) | ||
| 70235 | 2002-08-11 10:10:00 | Wandered off to www.scriptsearch.com and found this: document.write('<form><input type=button value="Refresh" onClick="location.reload()"></form>') This will give a button to refresh with. Now I'm not sure of the syntax but what about something like: <body onLoad="location.reload()"> Haven't tried it but it looks slightly similar to those spam emails that open web pages. Had a look once and there was an onLoad in the body as I remember. |
Heather P (163) | ||
| 70236 | 2002-08-11 11:20:00 | Sorry, that does not actually clear the cache, but just reloads the page from the cache (same action as performed by the refresh button). I wonder if there is no solution. There must be - some sites have pages that change frequently, and I never have to refresh those. Pity I cannot think of one to try. G P |
Graham Petrie (449) | ||
| 70237 | 2002-08-11 11:33:00 | Ever had much to do with asp? The asp code is: <% Response.Expires = 60 Response.Expiresabsolute = Now() - 1 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "no-cache" %> Everything within the <% %> runs on the server. But the rest of it should be VB Script (which will, of course, only run on in IE) Presumably there should be some javascript that works in a similar manner but whether it needs the asp engine on a server to execute or whether it will run on a client machine....? Let me know how you get on. Heather |
Heather P (163) | ||
| 70238 | 2002-08-11 11:42:00 | >>>I wonder if there is no solution. There must be - some sites have pages that change frequently, and I never have to refresh those. Ummm you wouldn't happen to have one of those pages open right now would you ;) |
-=JM=- (16) | ||
| 70239 | 2002-08-12 08:56:00 | Thanks Heather, but I have only started learning HTML (apart from simple stuff like anchors for posting in forums) in the last 10 days. I will have a look at asp, but it may be a while before I use it, or understandit enought o use your code. In the meantime, I will just have to put up with things as they are (or not use frames :-( ) JM, duh! :8} So, how come the page doesn't remain in the cache??? I couldn't find anything obvious in the code. G P |
Graham Petrie (449) | ||
| 70240 | 2002-08-12 09:02:00 | I just did a search to find out a little about asp. Wow! Looks cool! Although, I had better learn a litttle bit of Javascript and vbscript before I tackle it. My only programming experience is a very small amount of pascal. Thanks anyway. G P |
Graham Petrie (449) | ||
| 70241 | 2002-08-12 09:30:00 | Don't bother trying ASP with your Orcon (www.orcon.co.nz) account. You'll have to go to somewhere like Brinkster (http:) for that ;) | -=JM=- (16) | ||
| 1 2 3 | |||||