How to check Ajax Request and Response in Browser?

Are you developing an Ajax based application or placing some Ajax mechanism in your web pages? And you do not know how to verify the request and response of these Ajax calls.

Well! We shall look into Browser Developer Mode and see the Ajax Request and Response.

Open Chrome Browser and hit the URL of your website that has Ajax calls.

Now Open Developer Tools.

Options (Customize and control Google Chrome) -> More Tools -> Developer Tools.

There will be many tabs. But we use ‘Network’ tab for testing Ajax Calls.

Perform an action that triggers an Ajax Call.

For demonstration, we used Submit Quiz Question to TutorialKart. When you fill in the details and click on Submit, an Ajax Call is sent.

Ajax Request and Response in Browser Developer Tools

How to check the Ajax Request and Response

In the above picture, you see that there is a new entry in the Network Tab with the name admin-ajax.php.

Click on the entry.

Ajax Call Details

Headers Tab

In the headers tab, you have the following sections.

  • General
  • Response Headers
  • Request Headers
  • Form Data

In General section, you see the details like Request URL, Request Method (GET/POST), Status Code (if 200, then its a success), Remote IP Address.

Form Data

If you have done the Ajax Call on a form and sent the serialized form data, you can see the fields sent in the Ajax Call under Form Data section.

Ajax Call Form Data

Any response from the Ajax Call can be seen under Response Tab.

Ajax Call Response

How to display Less Than symbol in HTML Page?

<

Less than symbol is used in writing html tags. But if you want to display the less than symbol in an HTML page, use &lt;.

&lt; is the named HTML Entity for less than symbol.

You can also use Hex Code: &#x003C; or Decimal Code &#60 to display less than HTML Symbol.

Examples

 

Indian Rupee INR – HTML Hex and Decimal Code

20B9 – HTML Hex Code for Indian Rupee or INR

&#x20b9;

Following is an example to illustrate how to display Indian Rupee INR Symbol in HTML page using INR Hex Code.

Indian Rupee, INR symbol is ₹

8377 – HTML Decimal Code for Indian Rupee or INR

&#8377;

Following is an example to illustrate how to display Indian Rupee INR Symbol in HTML page using INR Decimal Code.

Indian Rupee, INR symbol is ₹

 

What is Node.js

Node JS

Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine

V8 engine compiles JavaScript code directly to machine code before executing it. It does not use traditional flow with an interpreter or compiler.

Node.js is an asynchronous event driven JavaScript runtime

Asynchronous event driven model: The model in which the processing or execution of a piece of code occurs as and when the event happens, rather than waiting for the previous event to complete.

Consider clientA requested for resource1. While clientA is being servered, another client: clientB has requested for resource2. With traditional server software, clientB is served only after clientA is served.

What if clientA takes a very long time? All the clients that come after clientA has to wait for that long and is not acceptable in realtime.

Which is why Node.js is built as event driven model. While clientA is being served, the control does not wait for the request to be completed. It delegates the work of fetching the resource. Meanwhile it servers other clients. When the requested resource is ready, clientA is served with the resource.

Node.js is open-source

Node.js’ source code, blueprint or design can be used, modified and/or shared under defined terms and conditions. This allows end users and commercial companies to review and modify the source code, blueprint or design for their own customization, curiosity or troubleshooting needs.

Node.js is cross-platform

Node.js is implemented on multiple computing platforms. Node.js can run on Microsoft Windows, Linux, and macOS.

Node.js is written in C, C++, JavaScript

Some parts of Node.js are written in C which need most performance. Node.js C++ implements some other modules and also the integration of V8 engine. JavaScript part helps with the inbuilt modules.

Node.js is licensed under BSD

BSD licenses impose minimal restrictions on the use and distribution of Node.js.

Other Names

Node.js is often called using Node, Node JS, NodeJS.

Node.js Resources

Official Node.js Site

Node.js Tutorial

Node.js Interview Questions