Why does Google prepend while(1); to their JSON responses?

后端 未结 7 1785
一整个雨季
一整个雨季 2020-11-22 06:43

Why does Google prepend while(1); to their (private) JSON responses?

For example, here\'s a response while turning a calendar on and off in Google Calen

7条回答
  •  醉梦人生
    2020-11-22 07:22

    This is to ensure some other site can't do nasty tricks to try to steal your data. For example, by replacing the array constructor, then including this JSON URL via a

提交回复
热议问题