Friday, December 01, 2006

Your Browser Cache, and Web Sites With Dual Addresses

As you surf the web, and read various web sites, you'll occasionally notice oddities. Following one link, you'll see one version of a web site; following a second link, you'll see the same web page, but with different content.

Obviously, the web page was updated, between the first time that you visited it, and the second time. Nothing odd there.

But here's the oddity. You visit the web site a third time, using the first link, and you see the same, older content. Then you check the second link again, and it shows the newer content again.

What's going on here?

It's simple, really, and this example, which uses Blogger, also applies to the Internet, in general. With Blogger, "www.bloggerstatusforreal.blogspot.com/" - and "bloggerstatusforreal.blogspot.com/" - both refer to the same blog, which is "bloggerstatusforreal" (and now, "blogging.nitecruzr.net" - but that that is another story altogether).

On your computer, "www.bloggerstatusforreal.blogspot.com/" and "bloggerstatusforreal.blogspot.com/" are stored in your cache, separately. Let's look at a hypothetical example.
  1. The cache in your browser has a 1 week expiry.
  2. You read
    bloggerstatusforreal.blogspot.com/
    2006/12/your-browser-cache-and-web-sites-with.html

    today. You cache today's copy, under "bloggerstatusforreal.blogspot.com".
  3. I update "Your Browser Cache, and Web Sites With Dual Addresses" tomorrow.
  4. The following day, you read
    www.bloggerstatusforreal.blogspot.com/
    2006/12/your-browser-cache-and-web-sites-with.html

    You cache tomorrows copy, under "www.bloggerstatusforreal.blogspot.com".
  5. You then reread
    bloggerstatusforreal.blogspot.com/
    2006/12/your-browser-cache-and-web-sites-with.html

    Since it's only 2 days old, you'll read it from cache. The cached copy precedes the update in step 3.

Step 5 will show an older copy of the web page, even though you do it after step 4. Next week, "bloggerstatusforreal.blogspot.com" will expire a day sooner than "www.bloggerstatusforreal.blogspot.com". The problem may repeat, in reverse.

So expect to see alternating differences, one version being more current than the other, forever.

You'll see this problem during the custom domain publication transition, too. In this example, my blog would be alternately visible as "blogging.nitecruzr.net", and "www.bloggerstatusforreal.blogspot.com", for instance. This confusion may be even deeper, as you may have more than one cache, affecting your browsing.

If you ask for advice from the experts, and they advise you to clear your cache, this is why. Both versions of the blog, on your computer, will be refreshed simultaneously, and then be in synchronisation with each other. This allows more consistent troubleshooting.

Now you can reduce this confusion by urging your readers to consistently use either the "root" or the "www" alias of the blog. If you're going to effectively cut down on the confusion, though, you'll need to use the Google Webmaster Tools "Preferred domain" setting.

>> Top

2 comments:

GillianWaters said...

what if you have two different addresses hooked to the same dashboard?

Chuck said...

what if you have two different addresses hooked to the same dashboard?

This would be best approached with patience and persistence, as a new discussion in BHF: How Do I?.