Determining if a newer page is available

At this point, we have to go out on the Internet and see if there is a newer page available on your server. We do something rather clever where we ask if the page has been modified since the Last-Modified date we have for our local copy. This is done using the GET If-Modified-Since command, for those of you familiar with HTTP 1.1.

If the page has not been modified, the server on the Internet will tell us that the page has not changed. This comes in the form of a 304 Not-Modified message. If this is the case, then even though your M-Business Sync Server's copy of the page is stale, it is still the most recent, and we serve it anyway. By doing so, we avoid loading the entire page over again from your Web server. All we need to receive is the little 304 message telling us that nothing has changed.

Note

Not all Web servers add a Last-Modified date by default. If your Web server does not, you should configure it so that it does.

Cached page sent when source page has not changed

If the page on the Internet has been updated, then we go out and grab the newer, fresher version of the page, note the time, and then use this newer page in our cache.

Outdated cached page is updated from source page