Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development

Session Cookies

Author Message
bartocc



Joined: 27 Mar 2005
Posts: 9

Posted: Tue Nov 16, 2004 - 7:06 am    Post subject: Imported from The Dashboader Reply with quote

i am creating a widget that is supposed to go and fetch my bank account information. i got it to work but still have a bug caused by cookies. my html+javascript page sends XMLHttpRequest() to the server to authenticate me (https). this causes 2 sessions cookies to be created.

when i first load my page and the cookies doesn't exist, they are created and everything goes well. if i reload my page after, with the cookies already there this time , my cookies are messed up and the download of my page fails.

i would like to be able to test the existence of these session cookies and delete them. is it possible ? and if so with javascript or with a plug-in ?

thanx
julien
View user's profile Send private message Widgets
Chris



Joined: 27 Jan 2005
Posts: 344
Location: Durham, UK

Posted: Tue Nov 16, 2004 - 7:06 am    Post subject: Imported from The Dashboader Reply with quote

Are you creating the cookies yourself in the code, or are they being sent for you automagically (as in, Safari/Dashboard is sending cookies you have stored related to the web site as part of the HTTP request without you doing anything)? If you are setting them yourself in the request header you could set the expirey date for something like 5 seconds in the future. As long as you don't reload any more frequently than every 5 seconds, you should be alright, I suppose...

You can check for cookies using the document.cookie object. I haven't used cookies in ages, but do a quick google around to see what you can come up with.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
bartocc



Joined: 27 Mar 2005
Posts: 9

Posted: Tue Nov 16, 2004 - 7:06 am    Post subject: Imported from The Dashboader Reply with quote

i don't create cookies myself. they are created as they would be in safari itself. i tried to access them with document.cookie but seems that this method doesn't take into account the sessions cookies.

i am going to try and see what happens when i create those myself.
View user's profile Send private message Widgets
Jeremy
Administrator


Joined: 27 Mar 2005
Posts: 62
Location: Melbourne, Australia

Posted: Fri Apr 01, 2005 - 6:55 pm    Post subject: Reply with quote

Moving to Widget Development...
View user's profile Send private message Send e-mail Visit poster's website Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group