`
driftcloudy
  • 浏览: 130796 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

【翻译】window.name Transport(2)

阅读更多

Benefits

window.name比其他的跨域传输技术更有优势:

  • 它比JSONP安全。可以说它和其他基于安全传输的frame(比如fragment identifier messaging ,Subspace)一样安全。(I)Frames 也有他们自己的安全问题,因为frame可以改变其他frame的location,但这是个非常不同的安全溢出,一般来讲,这并不严重。
  • 首先它比FIM快的多,因为它无需处理小包量的fragment identifier,也没有那么多针对IE的连锁反应。其次,它也比Subspace快。Subspac需要两个iframe,并且在请求中加载两个本 地HTML页面。window.name仅仅需要一个iframe和一个本地页面。
  • 它比Subspace和FIM更加安全和简单。FIM有点复杂,而Subspace相当复杂。Subspace还有一系列的额外约束以及安装需求,比如预先声明所有的目标主机和拥有针对若干不同特殊主机的 DNS 入口。window.name 则简单容且易于使用。
  • 它并不需要插件(比如Flash)或其他替代技术(比如Java)。

How does it work? windowname.png

  你可以使用windowNam模块而无需理解它是如何工作的。但既然这是使你远离糟糕web服务的工具,你当然想知道它是如何提供保护的。name是浏览器中window对象的一个属性,即使浏览器加载了新的页面,name的值依然保持不变。当在iframe中加载一个资源时,目标页面将会设置其name属性,这个name属性的值可以通过访问web服务来获取。注意,name属性只可以被同一个domain下的frame所访问。也就是说,当远程web服务页面被加载后,为了访问返回的name值,Dojo必须操纵frame返回原先的domain。当dojo在取得name的时候,这项机制也能够避免其他的frame访问name属性。一旦name的属性值被获取,这个frame就可以被销毁了。

因为name属性被置于最顶层,所以它显得并不安全。任何name属性中的信息都可以被随后的页面所访问。然而,windowName模块总是在iframe中加载目标资源,当name中的数据被获取后,iframe立刻被销毁,或者你可以浏览一个新的页面使得其他所有的页面都没有访问window.name的权限。

 

 

 

 

 

 

 

 

 

 

分享到:
评论

相关推荐

    计算机网络_第四版(andrew S. Tanenbaum)

    Chapter 2. The Physical Layer Section 2.1. The Theoretical Basis for Data Communication Section 2.2. Guided Transmission Media Section 2.3. Wireless Transmission Section 2.4. Communication ...

    计算机网络(第四版)(英文版+答案)

    Chapter 2. The Physical Layer Section 2.1. The Theoretical Basis for Data Communication Section 2.2. Guided Transmission Media Section 2.3. Wireless Transmission Section 2.4. Communication ...

    《计算机网络(第四版)》【英文原版exe电子书】【Andrew S. Tanenbaum】Computer Networks(Fourth Edition )

    Chapter 2. The Physical Layer Section 2.1. The Theoretical Basis for Data Communication Section 2.2. Guided Transmission Media Section 2.3. Wireless Transmission Section 2.4. Communication ...

    计算机网络英文版(第四版)

    Chapter 2. The Physical Layer Section 2.1. The Theoretical Basis for Data Communication Section 2.2. Guided Transmission Media Section 2.3. Wireless Transmission Section 2.4. Communication ...

    计算机网络 英文原版版(第四版)

    Chapter 2. The Physical Layer Section 2.1. The Theoretical Basis for Data Communication Section 2.2. Guided Transmission Media Section 2.3. Wireless Transmission Section 2.4. Communication ...

    计算机网络第四版(英文原版)

    Chapter 2. The Physical Layer Section 2.1. The Theoretical Basis for Data Communication Section 2.2. Guided Transmission Media Section 2.3. Wireless Transmission Section 2.4. Communication ...

    计算机网络自顶向下方法 英文 第6版 原版

    Summary Chapter 2. The Physical Layer Section 2.1. The Theoretical Basis for Data Communication Section 2.2. Guided Transmission Media Section 2.3. Wireless Transmission Section 2.4. Communication ...

    网络教程多所重点大学指定教材电子版

    Chapter 2. The Physical Layer Section 2.1. The Theoretical Basis for Data Communication Section 2.2. Guided Transmission Media Section 2.3. Wireless Transmission Section 2.4. Communication ...

    精通websphere MQ

    目录.................................................................................................................................2 内容提要...........................................................

    python3.6.5参考手册 chm

    PEP 3155: Qualified name for classes and functions PEP 412: Key-Sharing Dictionary PEP 362: Function Signature Object PEP 421: Adding sys.implementation SimpleNamespace Using importlib as the ...

    js的日历时间控件

    new Ajax.Request(base+"locales/"+locale+".js",{onSuccess:function(transport){eval(transport.responseText);this.setLocale(new Control.DatePicker.i18n(locale))}.bind(this),onFailure:function(transport){...

    Java邮件开发Fundamentals of the JavaMail API

    find support for NNTP (Network News Transport Protocol) [newsgroups], S/MIME (Secure Multipurpose Internet Mail Extensions), and more. Fundamentals of the JavaMail API Page 5 Presented by ...

    计算机网络第六版答案

    as modern routers sometimes act as firewalls or caching components, and process Transport layer as well.) Link layer switches process link and physical layers (layers 1 through2). Hosts process all ...

    VB.NET Developer's Guide(4574).pdf

    2.If necessary, use the Viewmenu to open the Properties window. 3.In the Properties window, click the Itemsproperty, then click the ellipsis. 4.In String Collection Editor, type the first item, then ...

    Git-2.21.0-64-bit.zip

    hardcoded name "origin" to name that remote; it has been corrected to honor the "--origin <name>" option. * "git fetch" into a lazy clone forgot to fetch base objects that are necessary to ...

    路由器配置实例--100例

    Router(Config)# access-list 100 deny ip 204.152.64.0 0.0.2.255 any Router(Config)# access-list 100 deny ip 0.0.0.0 0.255.255.255 any Router(Config)# access-list 100 permit ip any any Router(Config-...

    RFC10xx 内容,分析与详解

    RFC1006 - ISO Transport Service on top of the TCP RFC1007 - MILITARY SUPPLEMENT RFC1008 - IMPLEMENTATION GUIDE RFC1009 - Requirements for Internet Gateways RFC1010 - ASSIGNED NUMBERS RFC1011 - ...

Global site tag (gtag.js) - Google Analytics