Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

cache problem - advice needed, please


  • Please log in to reply

#1
jamajam

jamajam

    Member

  • Member
  • PipPip
  • 10 posts
i currently have the following metatags on every page:

<meta name="Robots" content="ALL,INDEX,FOLLOW">
<meta http-equiv="PRAGMA" content="NO-CACHE">

after doing some googling it seems that some browsers ignore 'pragma-no cache' (and also, some search engines won't index the site) so i would like some advice, please, as to the best way to set up the site to cope with the following situation:


there are many pages on the site where the content remains unaltered.

there are some pages where the pages are regularly updated.

*every* page includes a link to a javascript menu and css stylesheet - these are changed occasionally.



i know that if a user visits a page and reloads/refreshes the page, they will see the newest content but the point is, they don't know if the content has changed or not and whether they need to refresh?

so how can i set things up so that the browser automatically fetches the latest page if there has been a change made, including a page where the only alteration has been to one of the scripts?

any advice would be much appreciated :whistling:
  • 0

Advertisements


#2
Neil Jones

Neil Jones

    Member 5k

  • Member
  • PipPipPipPipPipPipPipPip
  • 8,476 posts
There's an option for this in Internet Explorer. Go to Tools -> Internet Options -> General tab. Under one of the settings buttons on this page is the option you want to force IE to always check for new page versions.
  • 0

#3
jamajam

jamajam

    Member

  • Topic Starter
  • Member
  • PipPip
  • 10 posts
sorry, i didn't make the question clear.

how can i make sure that any visitor to my site is seeing the latest, updated page without having to do as you suggested above. obviously, they will not know whether the page is fresh or not and therefore will not know whether they need to reload the page to see any changes.

in other words how can i prevent the users browsers from showing the cached page *if* the content has changed since their last visit and *if* the change is only to a javascript or css file?
  • 0

#4
Johanna

Johanna

    The Leather Lady

  • Moderator
  • 3,038 posts
The user's browser should automatically fetch the latest page available when they visit your site. If it doesn't, the problem is on the visitor's end, not yours.
Johanna
  • 0

#5
jamajam

jamajam

    Member

  • Topic Starter
  • Member
  • PipPip
  • 10 posts

The user's browser should automatically fetch the latest page available when they visit your site. If it doesn't, the problem is on the visitor's end, not yours.
Johanna


this is true for any first time visitors but what about a visitor returning for a second or third time in the same day? won't they be getting the page from their cache? if so, they won't necessarily know that they have to refresh their browser to see the content added since their last visit.
  • 0

#6
Neil Jones

Neil Jones

    Member 5k

  • Member
  • PipPipPipPipPipPipPipPip
  • 8,476 posts

The user's browser should automatically fetch the latest page available when they visit your site. If it doesn't, the problem is on the visitor's end, not yours.
Johanna


this is true for any first time visitors but what about a visitor returning for a second or third time in the same day? won't they be getting the page from their cache? if so, they won't necessarily know that they have to refresh their browser to see the content added since their last visit.


Any decent browser would automatically check the page you visit for new content when you go there - they usually only go to the cache if the computer isn't on the internet or if the page hasn't actually changed (or can't be loaded). Its only Internet Explorer that occasionally decides it's too idle to check the page, and its an issue in Internet Explorer that hasn't worked properly since IE4 came out in 1997.

The problem with the headers approach is that it usually only affects the page being loaded and not anything else that's been called by it - therefore if a browser is being told not to cache a page, it will usually cache everything else that's loaded by that page, but not the page itself.

The only other way I can see doing this is making a website using a scripting language, such as PHP. One can set the headers in this way and they are then sent by the server and affect everything coming off the server. It's slightly more reliable than asking the web browsers to do it, but its not totally failsafe either.
  • 0

#7
Johanna

Johanna

    The Leather Lady

  • Moderator
  • 3,038 posts
Their browser performs the equivalent of a "refresh" when they visit the page again, by default. You don't need to make allowances like that.
Johanna
  • 0

#8
jamajam

jamajam

    Member

  • Topic Starter
  • Member
  • PipPip
  • 10 posts
ok, thanks for your advice !!
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP