|
| ||||
"Help! AvantGo is erasing my cookies for no reason!"
Occasionally, we hear from AvantGo media channel customers who think that the AvantGo Client or the AvantGo sync server has somehow erased their cookies for no apparent reason. So far, in every case we've investigated, neither the AvantGo Client nor the AvantGo sync server has ever erased a cookie unless it has been told to. That being said, it can be hard to debug cookies in an AvantGo channel, since you are not able to view them directly in any sort of file on your desktop computer. So here are a few suggestions that might help you out.
Create an For example, here is a link you can create for your test channel that will add a test cookie and contains a
Note: In the above example you need to replace Q: Hey, I tried cutting and pasting that link into my browser (and changed A: As a security precaution, we only let you set a cookie and see debug information if the link comes from the same domain as your channel. That is, if your channel's domain name is What this means is that you cannot just cut-and-paste the link into your browser. You need to actually publish it on your site somewhere, so the referring link checks out OK. Q: Can I use this link to view cookies on somebody else's account? A: No. Not unless you are able to log in to AvantGo as that user. AvantGo will only display cookie information for the account you have logged in to. You may notice that when you view your cookies, you have a whole bunch of extra cookies you did not suspect. This is because the AvantGo Client, unlike other browsers, will keep session cookies (that is, cookies with no expiration date) around for a week. The idea being that if you normally use session cookies to log in your users, they will not have to re-enter their login information every single time they sync just once a week. The drawback is that many websites are setting session cookies without knowing it ASP pages do it all the time, unless you explicitly turn session cookies off in the IIS server manager. Apache servers will set session cookies if you happen to be using With all that being said, I do not recommend you rely on session cookies being around for a week, for a couple of reasons:
Caution: Here is another thing to watch out for: Suppose you have created your channel and you want to include a "Logout" function that erases all of your cookies. Do not include this as a link! Remember, the AvantGo sync server spiders through your whole channel every time a user syncs. If you include a "Logout" link that erases all your cookies, the AvantGo sync server will follow it and erase all of your cookies every time you sync! Tip: In order to create a "Logout" function that erases all of your channel's cookies, make it into a form submission. The AvantGo sync server will not process the form request until the user clicks on the "Submit" button. | ||||
|
