Accessing third party cookies in Firefox

后端 未结 4 1799
闹比i
闹比i 2021-02-04 15:06

We\'re building a Facebook application here at work, using the iframe method. For the application to work, it needs to set cookies from within the iframe.

Safari has thi

相关标签:
4条回答
  • 2021-02-04 15:32

    Is there anyway to get Firefox to send cookies to an iframe on an external server when third party cookies are disabled?

    No. And that is good. Disabling 3rd party cookies should disable them.

    0 讨论(0)
  • 2021-02-04 15:32

    Yeah it doesn't send or accept 3rd party cookies when you uncheck 3rd party cookies. However; the checkbox is "Accept third-party cookies," so it definitely seems like it should still /send/ the cookies, just not accept any new ones... wack.

    0 讨论(0)
  • One technique is to do a background POST to a hidden iframe on the initial page load using JavaScript. As soon as the POST response successfully returns, you'll be able to set cookies. This removes the need to affect user experience (an interstitial to force interaction is another technique). Some more thoughts and sample code here: http://gist.github.com/586182

    0 讨论(0)
  • 2021-02-04 15:57

    Rather than targeting the browser, target the behaviour.

    Set the cookie and on the next page-load check for them with your JS. If they're not there, set them with the alternative method.

    (And make sure you don't end up in an infinite loop for users without cookies)

    Edit: Hmm if FF can't read them that might be an issue. How about sending everybody through this system?

    0 讨论(0)
提交回复
热议问题