Monday, August 21, 2006

Bypass, or Clear, Your Local Cache

In every Blogger forum I read, you see occasional complaints
I just made changes to my blog. Other folks can see my changes, but I can't. What is the problem?
The buttons on my Post Edit toolbar / my Navbar won't do anything. Help!!
The problem is quite simple. Portions of your blog, and of every other website that you've accesed recently, are stored locally, on your computer. The next time you access that blog or website, your computer won't have to waste your bandwidth downloading the same files. Have you ever noticed that the first time you visit a new website, you computer seems to run slower than subsequent times accessing that same website? This is not your imagination.

In some cases, as when you make changes and can't see those changes immediately, this is not a good thing. Until a file reaches a certain age (sits locally on your computer for a while), your computer won't even bother to check for its update. Your friends will see the changes, but you won't.

The cache is the local content of the web pages themselves. Many web pages also store settings locally on your computer, in cookies, that control how you use those web pages. Cache and Cookies complement each other, but don't confuse them - they are not the same.

Cache can be an issue depending upon how you login, and also what web address you use to access blogs.

There are several solutions, to make sure that what you see on your computer is up to date. They vary widely in effect. Understand the differences.

I. Clear Your Cache
The most drastic step is to clear your cache. This will remove all temporary Internet files, for all web sites, from the cache being cleared.

As you revisit each web page (not just the current one) in the future, each previously cached file must be reloaded. Depending upon the size of your cache, this may make a significant difference in your browsing speed. If you do a lot of web surfing, you will learn not to clear your cache, except when you truly need to do so.

If you're working on a problem that involves non-BlogSpot addressing (aka DNS issues), such as problems involving publishing to custom domains, you may also find it helpful to clear DNS cache.

II. Refresh This Web Page
Or, you may force a refresh of this page. Hit the F5 key, or hold down the Shift key and hit the Refresh button in the browser toolbar. This will delete just this web page, and all files associated with it, and reload each again into cache.

III. Dynamically Call The Server
Finally, you can temporarily ignore what's in cache, by adding a "?" to the end of a target URL. You might access this web page, for instance, as (I added a space in the middle of the URL, to allow the string to line break, and avoid another post / sidebar alignment problem).
http://blogging.nitecruzr.net/ 2006/08/bypass-or-clear-your-local-cache.html?
When you add a "?" to the end of the URL, you are forcing your browser to make a dynamic call to the web server. Dynamic calls (aka active server code) are not cached, they have to be evaluated, each time that you load the URL, by the browser contacting the web server. This may or may not reload all files associated with the web page. It won't change what's in cache, everywhere.

The latter may be a significant point to you. If your ISP caches web content locally, to improve performance for its customers, and you reload your cache or a single page (procedure I, or procedure II, above), you may reload from your ISPs cache. If you reload your entire cache, after dynamically reloading one web page, you could reload an older copy from your ISP. If you saw a new web page when dynamically loading the page (procedure III, above), you'll take a step back in time when you load the ISPs cached copy.

Try each solution, and find out what works for you. But be aware of the differences, and only clear what you need to.

>> Top

14 comments:

Under The Hood said...

"Bypass, or Clear, Your Local Cache"

Yet Another Alternative: Tell your browser to cache on a Ram Drive. Then your cache is, by definition, cleared at each re-boot.

True, this stance won't work for everyone, but if your main web sport is online newspapers, blogs, and the like, you'll start each day knowing that you really are looking at the latest.

Under The Hood said...

"by adding a "?" to the end of a target URL."

(OK, so I went back and read your article a SECOND time, that's good, isn't it?!!)


The "?" looks like a neat trick. Please elaborate. Ought I to go into my Bookmarks Manager and append "?" to each link that I don't want cached? Typical examples would ne online nespapers, blogs and the like.

Then I could switch back to a non-Ram disk for cache and let the browser make good use of the cache for images and the like.

Thanks, and I'm sorry for the double-comment; merge them if you like. I just get so excited about learning a new trick!

Chuck said...

The "?" on the end of a URL is a kludge. I think it's tricking the browser into thinking that it's a dynamic call to the URL, with arguments following.

You just give it no arguments. The browser evaluates it as dynamic, with a nul argument list.

Chuck said...

Excitement, and learning new tricks, is no problem.

The implications of using the "?" are interesting. I need to read some more, and see what the possibilities are. So now I have another post to write.

Thanks for the feedback!

Haunted TUNA said...

This was a very well written post. Good work!

Amanda said...

Phew, thanks for this post! I was beginning to think my blog was having problems with publishing!

Adding the ? to the end of my blogs address is what worked for me. I'd already tried refreshing the browser and such, which hadn't worked. Strange really, since I've never experienced this on my blogs before.

Much appreciation for your works!

Martial Arts Geek said...

v. useful post here :)

i sorted my posting problems by clearing cache and cookies.

i was also having problems with the 'add/change page elements' page as it wasnt showing the changes i had made.

all sorted now thanks

Gus said...

Thats all good. But from a visitor point of view, he might not realize that he should refresh or empty his cache. He might think that there were no updates. How can I force the webpage to load from the server on every occasion without the visitor intervention? I'm using blogspot.com

Chuck said...

Gus,

Your reader has 2 possible solutions.

1) Dynamic retrieval (Option III above).
2) Syndicated feed.

The cache concept is built in to Internet design, and it's not going away. The total amount of bandwidth just won't support every reader of every web site constantly getting a new copy of every web page every time they reference it.

Proper web server tuning would include having a TTL (Time To Live) for the web pages in cache based upon average time span between changes. Unfortunately, that would be a Blogger responsibility, and I don't think that it's likely to be unique for every different blog, just an average across the entire Blogosphere.

Your readers have to suck it in, and try one of the above solutions.

i wont tell said...

But putting '?' at the end of URL doesn't working for me.
Some one please help me out to clear the ISP cache. I cant see my blog after installing wordpress, it shows same as before installing worpdress.

Mark Featherstone said...

You are a genius! Shift-Refresh reinstated the toolbar. Thanks!

Fel said...

thank for your help... it solved my problem...

warren said...

none of these suggestions worked. When I try to create a new post the cursor continues to spin for eternity. I have cleared my catched and cookies, refreshed the website/blog and have tried the ? at the end of the blog's URL. I have gotten NOWHERE. However, I can use my partner's computer using my login and it seems to work just fine. How do i get my computer to comunicate properly with the blog to allow meto post???? PLEASE HELP! thank you

Chuck said...

When I try to create a new post the cursor continues to spin for eternity.

That's a known problem, and it has been discussed elsewhere.