空的“for"Facebook ajax 中的循环 [英] Empty "for" loop in Facebook ajax

查看:24
本文介绍了空的“for"Facebook ajax 中的循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在浏览 facebook 和使用 Firebug 网络调试器时,我注意到 facebook 的 AJAX 响应都以一个空的 for 循环开始.

While surfing facebook and using the Firebug network debugger I noticed that facebook's AJAX responses all start with an empty for loop.

示例:

for(;;);{...}

有谁知道为什么要这样做?我认为这是为了防止某种 XSS 攻击,但我并不完全理解.谢谢!

Does anyone know why this is done? I assume it's to prevent some sort of XSS attack but I don't totally understand. Thanks!

推荐答案

Like google's

Like google's

while(1);

这样做是为了防止在<script>中进一步使用数据

it done for preventing of including this in <script> with further using the data

这篇关于空的“for"Facebook ajax 中的循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆