Http Request Header

http-request

HTTP stands for "Hypertext Transfer Protocol". The entire World Wide Web uses this protocol. HTTP headers are the core part of these HTTP requests and responses, and they carry information about the client browser, the requested page, the server and more. When we type a url in our address bar, our browser sends an HTTP request to the Http Server.

Example of Http Request Header :-

request-header-format
All above header informations we can access in our server side code.


How server will come to know, request is comming from Ajax or from Normal call(non ajax)?

In order to know request is comming from ajax call or , in http request header, we have an attribute "User-Agent" which is shown in below picture..

x-requested-with x-requested-with-example

How server will come to know, request is comming from which device? :-

In order to know request is comming from which device and browser, in http request header, we have an attribute "User-Agent" which is shown in below picture..

user-agent-header