久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <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="qwawimqqmiuu" id='bpXqT'><tfoot id='bpXqT'></tfoot><dl id='bpXqT'><fieldset id='bpXqT'></fieldset></dl></div>
      1. IE10 默認跨子域共享 cookie

        IE10 sharing cookies across subdomains by default(IE10 默認跨子域共享 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="qwawimqqmiuu" id='0NNI6'><tfoot id='0NNI6'></tfoot><dl id='0NNI6'><fieldset id='0NNI6'></fieldset></dl></div>

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

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

                  問題描述

                  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(技術上也是 www.example.com).

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

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

                  • 即使它共享該值,也沒有子域能夠清除 cookie.
                  • 當 TLD 清除 cookie 時,它??也會立即從所有子域中刪除.

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

                  解決方案

                  我剛遇到這個問題.

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

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

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

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

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

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

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

                  總而言之 - 當您擁有共享相同 cookie 鍵名的子域時,請勿使用非 www 域,因為雖然 Chrome/Firefox 會按照您的預期處理域關聯(lián),但 IE 會導致錯誤行為.

                  編輯--

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

                  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.

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

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

                  相關文檔推薦

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

                    <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="qwawimqqmiuu" id='Oqdo4'><tfoot id='Oqdo4'></tfoot><dl id='Oqdo4'><fieldset id='Oqdo4'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 国产高清视频在线 | 亚洲欧美在线视频 | 久久精品久久久久久 | 午夜丰满少妇一级毛片 | 国产精品亚洲成在人线 | 六月婷婷久久 | 欧美一级片在线观看 | 伊人二区 | 亚洲精品一区二区 | 91成人在线| 日韩精彩视频 | 欧美精品在线观看 | 日本三级全黄三级三级三级口周 | 日韩中文一区 | 91久久国产精品 | 国产精品极品美女在线观看免费 | 99精品视频在线 | 国产色 | 欧美日本韩国一区二区三区 | 久久久久中文字幕 | 国产欧美精品一区二区 | 亚洲第一视频网 | 亚洲视频三 | 日韩av视屏 | 就操在线 | 亚洲区在线 | 黄色一级免费看 | 综合激情av| 7777在线 | 欧美激情精品久久久久久变态 | 天堂av在线影院 | 黄网免费看 | 奇米av | 中文字幕黄色大片 | 久久亚洲二区 | 欧美日韩手机在线观看 | 91高清在线观看 | 欧美老少妇一级特黄一片 | 免费黄视频网站 | 国产成人免费视频网站视频社区 | 四虎av电影 |