Solved

I need to command HTML to reload a site on opening so it is guarenteed current

Posted on 2003-11-16
10
269 Views
Last Modified: 2010-04-09
I finally got the frames all figured out but know it doesn't refresh the page automatically to guarentee its correctness.  The only way I can see it most current is by clearing the web content on my PC and coming back.  The navigational bar is programmed in JavaScript and mainly everything else is in HTML.

Site: http://www.freewebs.com/demogovclan/

Note: The only page with info thus far is the News page.
0
Comment
Question by:FordGT90Concept
  • 5
  • 5
10 Comments
 
LVL 11

Accepted Solution

by:
Zontar earned 125 total points
ID: 9761026
Put these inside the <head>...</head> tags

<meta http-equiv="Content-Expires" content="Tue, 01 Jan 1980 12:00:00 GMT">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
0
 

Author Comment

by:FordGT90Concept
ID: 9761034
not a clue what those lines mean but i'll give it a go...
0
 

Author Comment

by:FordGT90Concept
ID: 9761057
<HEAD>
<meta http-equiv="Content-Expires" content="Tue, 01 Jan 1980 12:00:00 GMT">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
</HEAD>

Is what I added and it didn't work :(
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

Author Comment

by:FordGT90Concept
ID: 9761084
Ah, I had to empty the history first then refresh.  So far so good.  Thanks for the help.
0
 
LVL 11

Expert Comment

by:Zontar
ID: 9761110
Another trick is to place the following JS code in all your pages:
<script type="text/javascript">
window.onload = fixLinks;

function fixLinks()
{
  var timeStamp = new Date().getTime();

  if(document.links[0].search.indexOf("?") == -1 && self.location.href.indexOf("?ts=") == -1)
  {
    self.location.href += "?ts=" + timeStamp;
  }
  else
  {
    var allLinks = document.links;

    for(var i = 0; i < allLinks.length; i++)
      allLinks[i].href += (allLinks[i].href.indexOf("?") != -1 ? "&" : "") + "?ts=" + timeStamp;
  }
}
</script>

This adds a querystring in the form of a millisecond timestamp to all the links on your pages, which will make the browser think it's not visited them before.
0
 
LVL 11

Expert Comment

by:Zontar
ID: 9761116
>  Ah, I had to empty the history first then refresh.

LOL, no worries there, mate, my pleasure.
0
 

Author Comment

by:FordGT90Concept
ID: 9761136
should the HTML coded one be placed on every page or which ones?
0
 
LVL 11

Expert Comment

by:Zontar
ID: 9761533
All of them. Any page you don't want to be cached.
0
 

Author Comment

by:FordGT90Concept
ID: 9761573
Okay, thanks again for the help.
0
 
LVL 11

Expert Comment

by:Zontar
ID: 9761743
No worries. :^)
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question