Can I make an XMLHttpRequest to another domain?

后端 未结 7 1548
面向向阳花
面向向阳花 2021-02-18 18:29

Is there a way to use XMLHttpRequest in combination with other domains?

I would like to parse some xml from Google without having to use a server so it is minimalistical

7条回答
  •  南旧
    南旧 (楼主)
    2021-02-18 18:35

    Nope, not right now. I believe I read that plans/design's are in the works by standards groups for the future, so we can securely do this.

    Cross site scripting vulnerabilities would be rampant other wise.

    JSONP is a possible solution if the other sites API supports.

提交回复
热议问题