XMLHttpRequest Vs HttpRequest

回眸只為那壹抹淺笑 提交于 2020-01-01 01:53:22

问题


Does anyone know, what an XMLHttpRequest enables a web page to do, which cannot be done using a normal HttpRequest?


回答1:


XMLHttpRequest in a standard javascript object that allows you to make HTTP Requests from the browser in javascript.

HttpRequest is a server side object that represents a request to the server.

In summary - one works in the browser, the other in the web server. They also have completely different roles. XMLHttpRequest is for fetching web resources within the browser. HttpRequest represents an incoming request.



来源:https://stackoverflow.com/questions/8668449/xmlhttprequest-vs-httprequest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!