Caching FAQ

Q: This seems like an awful lot of work. Is it really worth it?

A: Yes. And not just for your M-Business channel. There are many ISPs out there that take advantage of caching as well. Once you have set up your channel for caching, go and set up the rest of your site for caching. Your Web site will suddenly seem to download a whole lot faster. So it is definitely worth the time.

Q: I set up my front page's logo to expire in several months. Now they are telling us we have a new logo. How do I change it?

A: Once a file has been cached, there is not a whole lot you can do to change it. What you can do, however, is create a new file for your logo and have your front page point to version 2 of the logo instead. Once your front page expires (which should be significantly less than 6 months), the new version that points to the new logo will be used.

For this reason, we recommend that if you are just testing your channel, you should keep it all non-cached before it goes live.

Q: Hey, I set up my channel for caching, but I am still getting thousands of hits a day. What is wrong?

A: Nothing is wrong. Remember that we have several sync servers, each with its own cache, and we cache different versions for different devices. You might reasonably expect a single page to be hit 50 to 60 times per caching period before it is finally cached in every form on every sync server. This means that if you have a channel with 20 pages, your server could still get hit 1000 times by your M-Business Sync Server for every cache period.

Q: It seems like that would defeat the purpose of caching?

A: No. Remember, that is pretty much an upper limit to how often your page will get hit. That is, if your subscriber numbers doubled, your server would still only get hit about 1000 times by your M-Business Sync Server. If you want to reduce your page hits even more, increase your caching time.

Q: How can I tell I have set caching up properly?

A: The easiest way is check your HTTP headers. Telnet to your Web site using port 80 and retrieve the page using a GET command. For example, if your channel is www.mysite.com/AGChannel/index.html, you would telnet to www.mysite.com:80, then type:

GET /AGChannel/index.html HTTP/1.1 (Enter) Host: www.mysite.com (Enter)(Enter)

Look at the headers that get returned. If you see the Cache-Control headers, then caching is set up properly.

Those of you who work in UNIX-based systems might also have the GET command at your disposal. If you type something like the command below, you will receive your channel's index page, along with any HTTP headers at the beginning.

GET -e "http://www.mysite.com/AGChannel/index.html"

Using a command like the one below will only display your HTTP headers, without any HTML content:

GET -ed "http://www.mysite.com/AGChannel/index.html"

Another way to test caching is to try synchronizing your channel several times in a row. You should notice your synchronization gets faster after synchronizing a few times. (to test this, you should only be synchronizing the channel you are testing. The presence of other channels will hide your results. Also, for testing purposes, you do want the Refresh setting for this channel in your M-Business Anywhere account to be set to Every sync.)

A third way is to check out the Cacheability Engine at:

[external link] http://www.mnot.net/cacheability/

Follow either of the two links in the "As a public Web Engine" section. These will bring you to Web sites that will report on any URL you would like for basic cacheability. Keep in mind their results are geared for general proxy servers, not the M-Business Sync Server, but they should be a fairly accurate guideline.

Finally, if you load your page in Netscape and choose View » Page Info you can sometimes tell if your page is set up for caching because a date will appear in the Expires field down below. Note, though, that this is not always accurate. Sometimes you have to unload Netscape's Memory and Disc Cache, and then hit Reload. So do not trust this one too much.

Q: Where can I find more information on caching?

A: There is an excellent tutorial at:

[external link] http://www.mnot.net/cache_docs/

Also, for the latest news and juicy gossip about the caching community, be sure to check out:

[external link] http://www.web-caching.com/

Q: I like to analyze traffic on my Web server, because then I can see how often my pages are being accessed. If I start caching documents on the M-Business Sync Server, I will not get the hits on my Web server. Is there anything I can do?

A: Well, in all honesty, this is a pretty inaccurate way of figuring out your Web traffic. Remember that the M-Business Sync Server updates all pages in all channels every time you synchronize. This means whether a user a) Reads your entire channel, b) Skims the front page, or c) Ignores your channel entirely, every page in your channel is going to get hit once the next time he synchronizes his mobile device.

If you absolutely must keep track of hits on your site, one trick many people do is to include a transparent 1x1 .gif file that does not cache (using, say, a no-store or private directive) on their front page. (You do not want to include a non-caching GIF on every page, because every page gets hit whenever a user synchronizes. So it is just redundant information.) Or just keep your very first page non-cacheable.

Q: It seems like this would just move the bottleneck from my Web server to my M-Business Sync Server?

A: No. Remember that people have to hit the M-Business Sync Server whether your page is cached or not. The only difference is that if your Web page is not cached, our server has to go out and retrieve it, compress it, and then upload it. Whereas if your Web page is cached, our server only needs to upload the precompressed version. So caching your pages helps us, too.