Developers
AvantGo Channel Developer Guide

TOC PREV NEXT INDEX


Avoiding grabbing pages multiple times

The AvantGo sync server is smart enough to know whether it has grabbed a page already or not. It does this by keeping track of every URL it is grabbed during the current sync. If you request a page that has already been downloaded, the AvantGo sync server will simply point to the downloaded page, rather than getting the page all over again.

Control case of channel URLs

Channel URLs are case sensitive, even if your web server is not. That is, suppose you have a page called articles.html — sometimes you link to it as articles.html, other times as Articles.html. If you are on a web server running in Windows 2000 or NT, these two URLs are treated as the same thing, and your website will look and act perfectly normal. But as far as the AvantGo sync server is concerned, the articles.html page and the Articles.html page are two totally different pages, so it will request that page twice every time a user syncs!

Note: If you are running your website on a Unix-based server, page names are case sensitive. This means you probably will not run into this problem, because if you had a page called articles.html, linking to it as Articles.html would get you a 404-not-found error.

Make all URLs pointing to same page identical

Along the same lines, it is also a bad idea to point to the same page with different URLs. Say, for example, you were including a link_from parameter in the URL that pointed to the referring page. You are only using this parameter for page-tracking purposes; it does not affect content, meaning that these three URLs point to the exact same page:

http://www.mywebsite.com/get_story.asp?storyID=50&link_from=TOC

http://www.mywebsite.com/get_story.asp?storyID=50&link_from=story51

http://www.mywebsite.com/get_story.asp?storyID=50&link_from=story49

This would be a bad idea for an AvantGo channel because it would treat each of these URLs as different pages, meaning it would request that story 3 times during the same sync. It also would not provide you with much useful information if you were trying to do this for page-tracking reasons, since it would grab every link and you would not know where the user really requested the story from.



TOC PREV NEXT INDEX