title: Safari iFrame cookie issue
body: <p>I realize that there are several questions related to this; however I've been going crazy trying to make this work.  Simply put, I have an MVC3 application that lives on our company's server, and it is served up in an iFrame on a client's URL.  All is fine and dandy with every other browser, execpt for Safari, which has the whole "no third party cookies" setting turned on by default.</p>
  
  <p>So here's what I've tried so far (we have custom libraries, so some of these functions are specific to our stuff):</p>
  
  <p>View:</p>
  
  <pre><code>@if ((HttpContext.Current.Request.UserAgent.ToLower().IndexOf("safari") &gt;= 0) &amp;&amp; HttpContext.Current.Request.Cookies["safari_cookie_set"] == null)
  {
    using (Html.BeginRouteFormSSL(RouteNames.SafariRedirect, FormMethod.Post, new { id = "safari-fix-form" }))
    {   &lt;input type="submit" value="Go!" /&gt; }
  }
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>[AcceptVerbs(HttpVerbs.Post)]
  public virtual ActionResult SafariRedirect()
  {
    ActionResult result = null;
  
    Response.Cookies.Add(new HttpCookie("safari_cookie_set", "cookie ok"));
    result = RedirectToRouteNoSSL(Index);
  
    return result;
  }
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>safariValidate: function(){
    if ($.browser.safari == true &amp;&amp; document.cookie.indexOf("safari_cookie_set") == -1){
            $("#safari-fix-form").submit();
        }
  }
  </code></pre>
  
  <p>So initially, the premise was to automatically post to the iframe using javascript (thus the .submit()).  It seemed to work, for a day or so.  Now, it doesn't matter how I post (notice the input button here...), a cookie will NOT be set within an iframe.</p>
  
  <p>Any ideas?  </p>