2

I already posted to Apple's Safari dev forum but got no responses so thought try cross posting elsewhere to get ideas:

I'm asking this question in regards to both

Safari Extension (toolbar type AJAX extension) Mac OS X dashboard widget

I assume both will be similar as they use the WebKit rendering engine?

I would like to know if the engine for maintaining built in session state support (cookies?) shares and persists the session between web content loaded on the page by the browser engine (HTML, JS, CSS, images, etc.) and requests made by XmlHttpRequest object.

I'm porting an AJAX app that requires session state that's shared between web content and XmlHttpRequest object. (i.e. no explicit cookie management for session state, at least not defined by the web service API that I use).

I successfully ported the app to Chrome, Opera, Windows 7/Vista gadget. It failed to work on iGoogle, and Mac OS X widget. Safari extension port had mixed results - it works in some cases but not in others.

I also did a Microsoft .HTA port (HTA app = web app to be run via IE w/o security restrictions of normal web apps, like cross domain XmlHttpRequests) and noticed that works only with IE7+ (due to implementation differences of native XmlHttpRequest in IE7+ vs MS XML version of earlier IEs)

I had consulted discussion/support group for iGoogle as well and learned that iGoogle too doesn't support such session state support.

I kind of worked around iGoogle issue by using Flash component to perform XmlHttpRequests which seemed to be able to share the overall browser session and thus work. I'm attempting that for Mac widget, it didn't seem to work. Can Safari toolbar extensions make use of Flash?

In any case posting this thread for more insight like if Safari/Mac is like iGoogle and not support a shared session between web content and XmlHttpRequest (or no cookies even supported).

FYI, the app I'm working on is below, you can try out what I have to investigate issue. When session state support fails, you get error message that need to enter code correctly (that's what the web service returns in this case, not very helpful to the user).

http://code.google.com/p/autosmsclients/

I've already hosted code for Mac OS X widget and Safari extension there.

Thilina Chamath Hewagama
  • 9,039
  • 3
  • 32
  • 45
David
  • 3,223
  • 3
  • 29
  • 41
  • I'm having a problem with a Safari Extension, specifically with session cookies, AKA non-persistent. It seems the global page of the extension and the web page do share persistent cookies, but different session cookies. Could you please post the link to the forum in safari dev? And, since it's almost a year now, have you found any information about this? – kprist Apr 23 '13 at 22:25
  • You can find the Safari dev post here: https://devforums.apple.com/thread/152323?tstart=120. I never got any response to the question and have not done anything since. Wish someone could provide an answer and/or suggested workaround. – David May 31 '13 at 06:21
  • Filed Apple bug: 14408523. Let's see what they do... – David Jul 10 '13 at 23:20
  • Since Apple bugs aren't disclosed to public, you can track the bug with this: http://openradar.appspot.com/14408523 – David Jul 20 '13 at 20:00
  • Turns out for Safari extension, what works for me is to set the browser to not block any cookies and website data. So users would have to do that to use the extension. But I haven't found a solution for dashboard widget yet. – David Apr 19 '15 at 02:29

0 Answers0