JQuery ajax cross domain call and permission issue

前端 未结 4 448
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-10 07:15

I have this polling script to check if a text file is created on the server. Works great locally, but fails when the file is on a different domain. How would i rewrite this

4条回答
  •  一整个雨季
    2020-12-10 08:10

    Ajax doesn't go cross domain. Your best bet is to create a php page on the local domain that does the check, and go to -that- with your ajax call.

提交回复
热议问题