Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing and css content

Status
Not open for further replies.

bogboy1978

Technical User
Nov 8, 2002
27
GB
OK I have 2 questions.

I am unable to get new versions of my page to show without first hitting the refresh button. This is no good for other visitors for my site as I update fairly regularly. I have incuded the following in my page:

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache" />

All of which is supposed to prevent caching and therefore make all visitors see the lates page, but it has no effect. Whay I was hoping for is a piece of code that will refresh the page one time only to save the visitors having to do it. Failing that does anyone have any other tips to sort this out? My browser setting (IE) are set to always check for a new version of a page but this again doesn't work and isnt ideal for the visitors to the site.

Secondly, I have a css style sheet that I use for the basic layout of the site. I have a grey border on the left and regular white section on the right. Have a look at to see what I mean.

You will notice that there are 50+ links down the left side, and when I add a new link it has to be added to each and every one of the linked pages too. Is there any way I could include those links in the css file itself? This would save me a lot of work as one change to the css file would make the change in each of the linked pages.

I hope you can help me sort this. these 2 problems have been giving me trouble for a while, and it's time to put an end to it.

Thanks in advance.
 
With regards to problem 2, you could you frames, or consider using either server-side includes (SSI), or a server-side language (ASP, JSP, PHP, etc) to generate the links.

Hope this helps,
Dan
 
Withing minutes of posting this I actually found out about include files on google. I have changed my pages from html to asp and placed the include statement in each page, to load the sidebar links from a txt file and then uploaded it. I gave it a go and it works. So in a matter of minutes my site has become an asp site, all be it a very basic one.

As to the refreshing question. If I put the data for each page in a sepperate file, the way I have for the sidebar, so that it is loaded from a txt file each time someone visits the page will this make it so users always see the most recent changes? I was just thinking that if the page data is loaded dynamically each visit that should sort it, or am i getting this wrong?

Thanks for your quick reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top