Hi
I've been making a few changes to my site and once I upload the new files the site updates when viewed in Safari, Chrome etc etc
But if I view the site in Firefox the changes don't appear.
Through trial and error I've worked out that if I 'clear recent history' then next time I open my site it updates correctly. So I'm presuming Firefox somehow saves my old site pages and shows those instead?
Obviously this is annoying to have to clear my history.
But it is also worrying that if I ask a client to view my site but they have already viewed it in the past, they might not see the changes I've made?
Help please!
Many thanks
Dan
It depends on what is going on, but from experience Firefox caches pages longer than most other browsers. The worst is XML to the point where I have started to attached a string of the date after each time an XML file is updated. There are overrides for the cache in most browsers. You can usually hold down "shift" when hitting refresh, or there is shift+cmd+r or shift+ctrl+r and I think ctrl+F5 works too.
Thanks mate.
I'm hoping there is a simple bit of code you can add to your site to prevent this from happening, as I will be updating my site quite often and dont want people to not being seeing the changes.
Obviously with most sites (bbc news etc etc) this can't happen otherwise they would be pointless!
I'm quite new to all this, so apologies if what i'm saying sounds incredibly basic.
Cheers
Dan
Comparing to a news site is something different. A site of the scale of a CNN or BBC, use Content Management Systems (CMS) and the data is stored in the database. So whenever a page loads the data is queried from the database, it can be cached, but usually it's not. If you are using static pages there is no way to get around this.
You can make your site in a CMS if you want from Drupal to Joomla to Wordpress to PyroCMS, Perch, CMS Made Simple, and the list goes on. If you are already using a CMS and it's caching when it shouldn't then that is an issue with the CMS that we need to examine.
My site is just a very basic site for my design portfolio.
www.dansmithdesign.net
Wierdly, I think this a recent thing that's started happening.
I'm pretty sure Firefox wasn't doing this when I set up the site about 6 months ago.
Perhaps a Firefox update has changed things?
It's not the end of the world but at the same time, I don't want to have to put in a little explanation asking people to clear their history if I'm telling someone to check out my site!
I'm thinking that it's probably to do with my personal Firefox settings but if can happen to me then it could happen to others viewing in Firefox.
Is there a way of getting my site to override the Firefox cache?
Cheers
Dan
Add this to the meta tag in all your pages. Change date and time as needed.
<meta http-equiv="Last-Modified" content="02 July, 2012 19:33:00 GMT" />
In theory, the browser will examine content in the last cached version and compare it with content on the remote server. If server content is more recent, it should be displayed. That said, this is not 100% foolproof.
Nancy O.
Thanks Nancy.
I'm quite new to all this so I just want to double check if I understand what you mean by meta tag.
Is this how the start of my code would look?...
(I've added your bit in bold)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/cv_template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Last-Modified" content="02 July, 2012 19:33:00 GMT" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>dansmithdesign / CV p1</title>
<!-- InstanceEndEditable -->
And then I would do this on all of my pages?
Many thanks
Dan
That's correct. If you want to be able to edit meta data on child pages, you'll need to add an editable region to your template like so.
<!-- InstanceBeginEditable name="meta" -->
<meta http-equiv="Last-Modified" content="02 July, 2012 19:33:00 GMT" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="doctitle" -->
<title>dansmithdesign / CV p1</title>
<!-- InstanceEndEditable -->
More on Meta Tags
http://www.w3schools.com/tags/tag_meta.asp
Nancy O.
North America
Europe, Middle East and Africa
Asia Pacific