Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XMLHttpRequest Vs HttpRequest

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

like image 383
dali1985 Avatar asked Dec 29 '11 13:12

dali1985


1 Answers

XMLHttpRequest is 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.

like image 60
Oded Avatar answered Sep 21 '22 07:09

Oded