Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6332315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:14:25+00:00 2026-05-24T18:14:25+00:00

Possible Duplicate: Why do people put code like “throw 1; <dont be evil>” and

  • 0

Possible Duplicate:
Why do people put code like “throw 1; <dont be evil>” and “for(;;);” in front of json responses?

I found this kind of syntax being used on Facebook for Ajax calls. I’m confused on the for (;;); part in the beginning of response. What is it used for?

This is the call and response:

GET http://0.131.channel.facebook.com/x/1476579705/51033089/false/p_1524926084=0

Response:

for (;;);{"t":"continue"}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:14:26+00:00Added an answer on May 24, 2026 at 6:14 pm

    I’m a bit late and T.J. has basically solved the mystery, but I thought I’d share a great paper on this particular topic that has good examples and provides deeper insight into this mechanism.

    These infinite loops are a countermeasure against “Javascript hijacking”, a type of attack that gained public attention with an attack on Gmail that was published by Jeremiah Grossman.

    The idea is as simple as beautiful: A lot of users tend to be logged in permanently in Gmail or Facebook. So what you do is you set up a site and in your malicious site’s Javascript you override the object or array constructor:

    function Object() {
        //Make an Ajax request to your malicious site exposing the object data
    }
    

    then you include a <script> tag in that site such as

    <script src="http://www.example.com/object.json"></script>
    

    And finally you can read all about the JSON objects in your malicious server’s logs.

    As promised, the link to the paper.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Is “for(;;)” faster than “while (TRUE)”? If not, why do people use
Possible Duplicate: When do you use the “this” keyword? If I have the following
Possible Duplicate: Why do people use __(double underscore) so much in C++ I was
Possible Duplicate: What features are people looking forward to in .Net 4.0 - 4.1
Possible Duplicate: Enable GPS programatically like Tasker Anybody know how to enable the GPS
Possible Duplicate: What do people find difficult about C pointers? New to c programming
Possible Duplicate: What are people replacing the missing C++/CLI Intellisense in VS 2010 with?
Possible Duplicate: What should we do to prepare for 2038? I don't mean 'people'
Possible Duplicate: What does this CSS shorthand font syntax mean? I saw many people
Possible Duplicate: Git for beginners: The definitive practical guide With git, how do people

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.