pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <legend id='bpXqT'><style id='bpXqT'><dir id='bpXqT'><q id='bpXqT'></q></dir></style></legend>

    <small id='bpXqT'></small><noframes id='bpXqT'>

    <tfoot id='bpXqT'></tfoot>

        <bdo id='bpXqT'></bdo><ul id='bpXqT'></ul>
      <i id='bpXqT'><tr id='bpXqT'><dt id='bpXqT'><q id='bpXqT'><span id='bpXqT'><b id='bpXqT'><form id='bpXqT'><ins id='bpXqT'></ins><ul id='bpXqT'></ul><sub id='bpXqT'></sub></form><legend id='bpXqT'></legend><bdo id='bpXqT'><pre id='bpXqT'><center id='bpXqT'></center></pre></bdo></b><th id='bpXqT'></th></span></q></dt></tr></i><div class="vr7b557" id='bpXqT'><tfoot id='bpXqT'></tfoot><dl id='bpXqT'><fieldset id='bpXqT'></fieldset></dl></div>
      1. IE10 默認(rèn)跨子域共享 cookie

        IE10 sharing cookies across subdomains by default(IE10 默認(rèn)跨子域共享 cookie)
        1. <legend id='0NNI6'><style id='0NNI6'><dir id='0NNI6'><q id='0NNI6'></q></dir></style></legend>

          <small id='0NNI6'></small><noframes id='0NNI6'>

            <bdo id='0NNI6'></bdo><ul id='0NNI6'></ul>
              <tbody id='0NNI6'></tbody>
          • <i id='0NNI6'><tr id='0NNI6'><dt id='0NNI6'><q id='0NNI6'><span id='0NNI6'><b id='0NNI6'><form id='0NNI6'><ins id='0NNI6'></ins><ul id='0NNI6'></ul><sub id='0NNI6'></sub></form><legend id='0NNI6'></legend><bdo id='0NNI6'><pre id='0NNI6'><center id='0NNI6'></center></pre></bdo></b><th id='0NNI6'></th></span></q></dt></tr></i><div class="bljr7d7" id='0NNI6'><tfoot id='0NNI6'></tfoot><dl id='0NNI6'><fieldset id='0NNI6'></fieldset></dl></div>

            • <tfoot id='0NNI6'></tfoot>

                  本文介紹了IE10 默認(rèn)跨子域共享 cookie的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  IE10 處理 cookie 和子域的方式似乎與其他主要瀏覽器(IE8、IE9、Firefox、Chrome、Safari)不同.

                  我們在測試環(huán)境中廣泛使用子域,例如:

                  • user1.devel.example.com
                  • user2.devel.example.com
                  • qa.example.com

                  我們的生產(chǎn)環(huán)境位于頂部,例如example.com(技術(shù)上也是 www.example.com).

                  我們天真地使用php setcookie($name, $value, $expires) 函數(shù)(沒有指定明確的路徑或域)來設(shè)置cookie,然后清除cookie(當(dāng)用戶注銷時(shí)) 通過為該值分配一個(gè)空字符串.這一直很有效,每個(gè)唯一的子域都使用自己的 cookie.

                  IE10 現(xiàn)在與所有子域共享"在 TLD 中設(shè)置的 cookie.我們觀察到的最初癥狀是沒有人可以退出子域.我們觀察到了一些事情:

                  • 即使它共享該值,也沒有子域能夠清除 cookie.
                  • 當(dāng) TLD 清除 cookie 時(shí),它??也會(huì)立即從所有子域中刪除.

                  是否有其他人觀察到與 IE10 相對于子域存儲(chǔ)/應(yīng)用 cookie 的方式類似的行為?除了在發(fā)送初始 Set-Cookie 標(biāo)頭時(shí)明確說明 cookie 適用于哪個(gè)域之外,還有其他解決方法嗎?

                  解決方案

                  我剛遇到這個(gè)問題.

                  這是一個(gè)指向探索此錯(cuò)誤/問題的人的鏈接:指定域和不指定域的 Cookie(瀏覽器不一致)

                  這也可能是相關(guān)的:子域的 Cookie 集, 但 IE Developer Tools 在根域顯示 cookie.我錯(cuò)過了什么?

                  我的結(jié)論是,當(dāng)從非 www 根域 ( http://sites.com),在 IE 中,這被視為所有子域的通配符 cookie.Chrome 和 Firefox 不會(huì)顯示此行為 - 它們將來自非 www 根域的 cookie 集關(guān)聯(lián)為僅與該根相關(guān)聯(lián).

                  我使用 .net webforms、IIS 和我的主機(jī)文件編寫了示例站點(diǎn).我有 3 個(gè)站點(diǎn):a.site.com、b.site.com 和 site.com.他們都提供同名的餅干.我們稱之為購物車".

                  您可以為 cookie 設(shè)置多個(gè)屬性,包括 cookie 應(yīng)關(guān)聯(lián)的域.我將此屬性留給 .net 定義/未定義.當(dāng) Chrome 從每個(gè)站點(diǎn)收到 cookie 時(shí),它??會(huì)顯示 cookie 的域明確來自瀏覽器地址欄中列出的域.在 IE 中,情況并非如此.IE 將來自 http://sites.com 的 cookie 視為被定義為.sites.com",并且根據(jù)cookie 的 RFC 這意味著它可以從所有子域訪問.

                  同樣在 IE 中,如果多個(gè) cookie 設(shè)置為相同的名稱,IE 會(huì)按照設(shè)置的順序?qū)⑺鼈兎祷亟o服務(wù)器.因此,如果我先訪問 http://sites.com 然后訪問 http://a.sites.com 然后刷新,IE查看來自http://sites.com 作為有效的 cookie 發(fā)送到服務(wù)器請求 http://a.sites.com 與 http://a.sites 的 cookie 一起發(fā)送.com,除了 http://sites.com 的 cookie 是列表中的第一個(gè).>

                  在 .net 中,據(jù)我所知,cookie 通常是通過鍵名而不是索引來訪問的.因此,當(dāng)服務(wù)器端代碼嘗試訪問名為ShoppingCart"的鍵的值時(shí),它將獲取設(shè)置 cookie 值的第一個(gè)站點(diǎn)的值 - 這里是 http://sites.com.

                  總而言之 - 當(dāng)您擁有共享相同 cookie 鍵名的子域時(shí),請勿使用非 www 域,因?yàn)殡m然 Chrome/Firefox 會(huì)按照您的預(yù)期處理域關(guān)聯(lián),但 IE 會(huì)導(dǎo)致錯(cuò)誤行為.

                  編輯--

                  為了向閱讀本文的任何人澄清,我使用 IE10 來探索這個(gè)問題.

                  IE10 appears to handle cookies and subdomains differently than other major browsers (IE8, IE9, Firefox, Chrome, Safari).

                  We use subdomains extensively for test environments, e.g.:

                  • user1.devel.example.com
                  • user2.devel.example.com
                  • qa.example.com

                  And our production environment lives at the top, e.g. example.com (and technically at www.example.com as well).

                  We use the php setcookie($name, $value, $expires) function naively (no explicit path or domain is specified) to set a cookie, and then clear cookies (when user logs out) by assigning an empty string to the value. This has always worked fine, and each unique subdomain used their own cookies.

                  IE10 now "shares" the cookie that was set in the TLD with all subdomains. The initial symptom we observed was that no one could log out of the subdomain. We've observed a few things:

                  • Even though it shares the value, no subdomain is able to clear the cookie.
                  • When the TLD clears the cookie, it is immediately removed from all subdomains as well.

                  Has anyone else observed similar behavior to how IE10 stores/applies cookies relative to subdomains? Is there any workaround, other than being explicit about which domain the cookie applies to when sending the initial Set-Cookie header?

                  解決方案

                  I have just run into this issue.

                  Here is a link to someone exploring this bug/issue: Cookies with and without the Domain Specified (browser inconsistency)

                  This also might be related: Cookie set for subdomain, but IE Developer Tools show cookie at root domain. What am I missing?

                  My conclusion is that when setting a cookie from a non-www root domain ( http://sites.com ), in IE this is seen as a wildcard cookie for all subdomains. Chrome and Firefox do not show this behavior - they associate a cookie set from a non-www root domain as being associated only with that root.

                  I coded up example sites using .net webforms, IIS and my hosts file. I had 3 sites: a.site.com, b.site.com and site.com. They all served cookies with the exact same name. Let's call it "ShoppingCart".

                  You can set multiple properties on cookies, including the domain the cookie should be associated with. I left this property to be defined/left undefined by .net. When Chrome received the cookie from each site, it displayed the domain of the cookie as being explicitly from the domain listed in the browser address bar. In IE this was not the case. IE treats the cookie from http://sites.com as being defined as ".sites.com" and according to the RFC for cookies this means it is accessible from all subdomains.

                  Also in IE, if multiple cookies are set with the same name, IE returns them to the server in the order they were set. So if I visit http://sites.com first and then visit http://a.sites.com and then refresh, IE views the cookie from http://sites.com as a valid cookie to send to the server in it's request for http://a.sites.com which is sent along with the cookie for http://a.sites.com, except the cookie for http://sites.com is the first in the list.

                  In .net, from what I've seen, cookies are generally accessed by keyname and not by index. So when the server side code attempts to access the value for the key named "ShoppingCart", it will grab the value for the first site that set the cookie value - here that would be http://sites.com.

                  In summary - don't use non-www domains when you have subdomains that all share the same cookie key names because, while Chrome/Firefox handle the domain association as you would expect, IE causes buggy behavior.

                  Edit--

                  Just to clarify for anyone reading this, I was using IE10 to explore this issue.

                  這篇關(guān)于IE10 默認(rèn)跨子域共享 cookie的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動(dòng)游標(biāo)不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個(gè)值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動(dòng)程序)

                    <bdo id='Oqdo4'></bdo><ul id='Oqdo4'></ul>

                    <small id='Oqdo4'></small><noframes id='Oqdo4'>

                        <legend id='Oqdo4'><style id='Oqdo4'><dir id='Oqdo4'><q id='Oqdo4'></q></dir></style></legend>

                      1. <tfoot id='Oqdo4'></tfoot>
                            <tbody id='Oqdo4'></tbody>
                        1. <i id='Oqdo4'><tr id='Oqdo4'><dt id='Oqdo4'><q id='Oqdo4'><span id='Oqdo4'><b id='Oqdo4'><form id='Oqdo4'><ins id='Oqdo4'></ins><ul id='Oqdo4'></ul><sub id='Oqdo4'></sub></form><legend id='Oqdo4'></legend><bdo id='Oqdo4'><pre id='Oqdo4'><center id='Oqdo4'></center></pre></bdo></b><th id='Oqdo4'></th></span></q></dt></tr></i><div class="f7zn7zl" id='Oqdo4'><tfoot id='Oqdo4'></tfoot><dl id='Oqdo4'><fieldset id='Oqdo4'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 珠海网站建设_响应网站建设_珠海建站公司_珠海网站设计与制作_珠海网讯互联 | 防火门-专业生产甲级不锈钢钢质防火门厂家资质齐全-广东恒磊安防设备有限公司 | 德州网站制作 - 网站建设设计 - seo排名优化 -「两山建站」 | 电动垃圾车,垃圾清运车-江苏速利达机车有限公司 | 除甲醛公司-甲醛检测-广西雅居环境科技有限公司 | 恒温恒湿箱(药品/保健品/食品/半导体/细菌)-兰贝石(北京)科技有限公司 | RO反渗透设备_厂家_价格_河南郑州江宇环保科技有限公司 | 土壤养分检测仪|土壤水分|土壤紧实度测定仪|土壤墒情监测系统-土壤仪器网 | 传动滚筒,改向滚筒-淄博建凯机械科技有限公司 | 全屋整木定制-橱柜,家具定制-四川峨眉山龙马木业有限公司 | 防渗膜厂家|养殖防渗膜|水产养殖防渗膜-泰安佳路通工程材料有限公司 | NMRV减速机|铝合金减速机|蜗轮蜗杆减速机|NMRV减速机厂家-东莞市台机减速机有限公司 | 诺冠气动元件,诺冠电磁阀,海隆防爆阀,norgren气缸-山东锦隆自动化科技有限公司 | 校园文化空间设计-数字化|中医文化空间设计-党建|法治廉政主题文化空间施工-山东锐尚文化传播公司 | 上海道勤塑化有限公司 | 路面机械厂家| 皮带输送机-大倾角皮带输送机-皮带输送机厂家-河南坤威机械 | 柴油发电机组_柴油发电机_发电机组价格-江苏凯晨电力设备有限公司 | 提升海外网站流量,增加国外网站访客UV,定制海外IP-访客王 | 校车_校车价格_19座幼儿园校车_幼儿园校车_大鼻子校车 | 智能垃圾箱|垃圾房|垃圾分类亭|垃圾分类箱专业生产厂家定做-宿迁市传宇环保设备有限公司 | 首页 - 军军小站|张军博客| 丹佛斯压力传感器,WISE温度传感器,WISE压力开关,丹佛斯温度开关-上海力笙工业设备有限公司 | 不锈钢复合板厂家_钛钢复合板批发_铜铝复合板供应-威海泓方金属复合材料股份有限公司 | 分光色差仪,测色仪,反透射灯箱,爱色丽分光光度仪,美能达色差仪维修_苏州欣美和仪器有限公司 | 苏州西装定制-西服定制厂家-职业装定制厂家-尺品服饰西装定做公司 | 塑钢课桌椅、学生课桌椅、课桌椅厂家-学仕教育设备首页 | 别墅图纸超市|别墅设计图纸|农村房屋设计图|农村自建房|别墅设计图纸及效果图大全 | 微型实验室真空泵-无油干式真空泵-微型涡旋耐腐蚀压缩机-思科涡旋科技(杭州)有限公司 | 双能x射线骨密度检测仪_dxa骨密度仪_双能x线骨密度仪_品牌厂家【品源医疗】 | 合肥花魁情感婚姻咨询中心_挽回爱情_修复婚姻_恋爱指南 | 胶原检测试剂盒,弹性蛋白检测试剂盒,类克ELISA试剂盒,阿达木单抗ELISA试剂盒-北京群晓科苑生物技术有限公司 | 河北中仪伟创试验仪器有限公司是专业生产沥青,土工,水泥,混凝土等试验仪器的厂家,咨询电话:13373070969 | 申江储气罐厂家,储气罐批发价格,储气罐规格-上海申江压力容器有限公司(厂) | 不锈钢螺丝,不锈钢螺栓,不锈钢标准件-江苏百德特种合金有限公司 交变/复合盐雾试验箱-高低温冲击试验箱_安奈设备产品供应杭州/江苏南京/安徽马鞍山合肥等全国各地 | 石家庄小程序开发_小程序开发公司_APP开发_网站制作-石家庄乘航网络科技有限公司 | 警方提醒:赣州约炮论坛真的安全吗?2025年新手必看的网络交友防坑指南 | 石家庄律师_石家庄刑事辩护律师_石家庄取保候审-河北万垚律师事务所 | 纸塑分离机-纸塑分离清洗机设备-压力筛-碎浆机厂家金双联环保 | 浩方智通 - 防关联浏览器 - 跨境电商浏览器 - 云雀浏览器 | 好杂志网-首页 |