The reason was found to be that the security verification of third-party cookies in these browsers is relatively strict. It needs to be confirmed that the user actively goes to the third-party website before the cookie can be read, so we added a guidance page that requires the user to click to enter our component. .
1. The homepage determines whether it is one of these browsers. If so, go to the guidance page. The reflag is to determine whether the guidance page has been visited. If it has already been booted, do not go to the boot page.
function safarireload()
{
var rehref=window.location.href;
if(jQuery.browser.safari&&<%=reflag %>=='0')
{
window.location.href='/safarireload.aspx? rehref=' rehref;
}
if(jQuery.browser.opera&&<%=reflag %>=='0')
{
window.location.href='/safarireload.aspx ?rehref=' rehref;
}
}
Backend code
public string reflag="3";
if (Request.QueryString["reflag"] != null && Request.QueryString["reflag"].ToString() != "")
{
reflag = Request.QueryString["reflag"].ToString().Trim();
}
else
{
reflag = "0 ";
}
2. The rehref of the guide page is the page you want to go back to
Backend code
protected void Button1_Click(object sender, EventArgs e)
{
if (Request.QueryString["rehref"] ! = null && Request.QueryString["rehref"].ToString() != "")
{
kaixindo.syslog(Request.QueryString["rehref"].ToString());
Response. Redirect(Request.QueryString["rehref"].ToString() "&reflag=1");
}
}
Use js on the boot page to get the parameter rehref of the web page url. Page performance is better. But that’s it for now.
We welcome corrections if the code is redundant or inefficient. Hope it helps some people.