third-party-cookie-setter:如何在 iframe 中设置 cookie

时间:2021-06-10 22:20:00
【文件属性】:
文件名称:third-party-cookie-setter:如何在 iframe 中设置 cookie
文件大小:11KB
文件格式:ZIP
更新时间:2021-06-10 22:20:00
JavaScript 第三方 Cookie 设置器 有时无法在用户第一次访问页面时从第三方框架站点设置 cookie。 这通常是合法网站正常运行所必需的。 此解决方案通过尝试设置 cookie,或将用户重定向到框架外到父窗口,设置 cookie,并将用户返回到父页面和框架页面来解决此问题。 语言 JavaScript 例子 框架站点包括检查是否可以设置 cookie 以及是否进行了尝试 < script src = "/path/to/csThirdPartyCookie.js" > < / script > < script > window . onload = function ( ) { var thirdPartyCookie = new csThirdPartyCookie ( ) ; if ( ! thirdPartyCookie . check ( ) ) {
【文件预览】:
third-party-cookie-setter-master
----csThirdPartyCookie-min.js(3KB)
----example()
--------index.html(2KB)
--------third_party_cookie_setter.html(439B)
--------iframe.html(484B)
----LICENSE(10KB)
----README.md(2KB)
----csThirdPartyCookie.js(7KB)

网友评论