just interesting https://medium.com I see that they make an automatic request on their searchajax GET , I opened my firebug (reason for curiosity) and got the results as follows:
(I typed in a search phrase sento trigger a GETrequest https://medium.com/search/all?q=sen . Note that if you opened it, it won’t work, since it only expects an ajax request)
])}while(1);</x>{"success":true,"payload":{"value":{"posts":[{"id":"748b78360917","versionId":"9fbac25a3c7c","creatorId":"29fed3d34b82","homeCollectionId":"e196dfdf4b5d","title":"Nous sommes des clients, pas des usagers. Et ça change tout" // MORE JSON RESPONSE FROM SERVER....
Now the question is not about the part JSON, I want to know what it means ])}while(1);</x>in the answer? What is the purpose of this?
Update
I know that while(1)for an infinite loop, but why do this?
Update
I read a similar question, now I know that using “while (1)” is to prevent json theft,])} While (1); “the part is still confusing, why use '])}' and ' '? Is "yet (1)" not enough?
source
share