views:

88

answers:

1

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

Example:

for(;;);{...}

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!

+3  A: 

Like google's

while(1);

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

zerkms