• Advertisement
Sign in to follow this  

[web] Safari, frames, cookies

This topic is 4241 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am experiencing a really weird problem with Safari. Basically what is happening is I have a page (ASP) that is inside a frame (HTML). The page in the frame receives some information in the url and creates a cookie and then redirects to another page. Now the problem is that the second page can't read from the cookie created on the first page. But when another Safari window is opened and we go to the first page directly (no frames) it works fine and additionally now the framed page also works fine (upon refresh). I am not sure where the problem is, the cookie is created successfully (no errors thrown) on the framed page. Also tested with IE on a Mac and IE/Firefox on the PC, they all work. The page is unsecured (http). Any suggestions? A cookie less version of the page can be created but I'd prefer to solve the cookie problem (if its a browser issue). Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Are you absolutely sure nothing is being cached when it shouldn't be?

Have you looked with a network analyser to be sure that the cookie is really being set?

Are you sure that the subsequent page is within the scope of the cookie? (Host / domain, path, secure etc)

Do you have more than one host name refererring to the same web site? (If so, don't.)

Mark

Share this post


Link to post
Share on other sites
Quote:
Original post by markr
Are you absolutely sure nothing is being cached when it shouldn't be?

I tell ASP not to cache either of the pages...
Quote:
Have you looked with a network analyser to be sure that the cookie is really being set?

Nope. Unfortunately I don't have access to the machine or a Mac. This was done over the phone with a client.
Quote:
Are you sure that the subsequent page is within the scope of the cookie? (Host / domain, path, secure etc)

Should be fine. First page in the form of Authenticate.aspx?userid=... and the second page just Main.aspx. The site is run unsecured (http) at that point but SSL is setup on the server, just doesn't work with frames so it isn't used.
Quote:

Do you have more than one host name refererring to the same web site? (If so, don't.)

I have a site.com and site.net but only .com is used (.net redirected to .com's main page)

Thanks for the reply. I think next I'm going to try and setup the cookie creation before the frameset page is displayed.

Share this post


Link to post
Share on other sites
The problem is solved, had to create a cookie less version of the functionality. Looks like the following was the cause of the problem.
Quote:
Safari ships with a conservative cookie policy which limits cookie writes to only the pages chosen ("navigated to") by the user. This default conservative policy may confuse frame based sites that attempt to write cookies and fail. Be sure to check the Safari preferences before assuming that your cookies are not written due to a bug; it may just be the users preference.
From the Safari Developer FAQ

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement