How to find whether Ajax request successfully send by Fire-bug add-on? - ajax

Please can some one explain me how to use Fire-bug add-on to check about whether Ajax request successfully send from our application ???

When you turn on Firebug, there's tab called 'Network' - there are shown all requests, especially ajax. The network tab allows you to filter requests and check request/response headers, status code, and message.
So, if you turn on Firebug and open Network tab (it's possible you'll have to enable tracking first, in that case it will show appropriate message), you will see if there was a request, where you expected it should be.
To see only ajax requests, check XHR on top bar, just under general tabs.

It will display in 'console' tab in firebug. i show you ajax call and request. it show ajax request like if ajax is successful then is gives 200 request and display the data or if the ajax request if fails is gives you a 301 request or some other request.

Related

What has been sent in POST?

I have a form on a web page. When I click the Submit button, the browser sends the form data within a POST request. If I refresh the result then it sends the data again.
I want to see what the POST data was without re-sending the form. How can I do it?
I know, there is the Developer Tools dialog which can show me what requests are being sent to the server. But, in order to analyze a request, I need to turn the DT on before I send the request. So, if I want to see what the POST content was, I need to send the form again, which I wanted to avoid.
I am sure that the browser knows what content of the POST was because if I refresh the result page, it will send the same POST data again. How can I access this information?
I would like to know the answer how to do it in Firefox but I am interested in Chrome as well.

500 error in Console, but nothing in Network

In Chrome Developer Tools, I'm getting a 500 error in the Console tab, for a GET request:
But in the Network tab, I don't see that request; I only see a POST request for the same page, with a 200 status:
Shouldn't I be seeing the SplitShip.aspx GET request in the Network tab?
Shouldn't I be seeing the SplitShip.aspx GET request in the Network tab?
You should of course, but maybe this request has been made using an AJAX call or something. So make sure you apply proper filter to your Network tab by selecting All:
This way Chrome will show All requests being sent to the server, including XHR ones. Are you seeing the smoking gun now?

Jmeter- how to deal with popup?

I recorded using a proxy server and cannot see the pop up got recorded. My pop is a Confirm popup so I cannot use HTTP Authorization manager. I have to click on OK on this pop up to get to next page. What do I use for this kind of pop up?
Thank you
When you click on OK, Does the page get submitted to server?
JMeter will record all the HTTP requests. Jmeter does not execute javascript as the browser does. So, The popup/alert you got, might have been triggered by a Javascript just for some confirmation which JMeter can not record. If the user action on the pop up had triggered any HTTP request, JMeter would have recorded the HTTP request to go the next page!.

Cross Origin Request being made without CORS

Somehow, we are able to make a cross origin XHR request on Chrome (latest stable) & Firefox without using CORS or anything of the sort. I am puzzled by this, hence this question.
Make an XHR Post Request to http://partychat-hooks.appspot.com/post/p_mwe2ztni with the data:
{body:"Some text"}
If you are on a Jquery enabled site, just type $.post("http://partychat-hooks.appspot.com/post/p_mwe2ztni",{body:"Hello World"}) on the console. SO has Jquery, so you can just press F12 now and paste this in your console.
The request goes from "Pending" to "cancelled" over in the network tab. The browser even gives us a warning about However, wireshark tells me that the request is actually getting made. (and is confirmed by a ping on the chatroom (join us at abhshkdz#im.partych.at)).
The following screenshots shows 3 things:
The request was made by JS
The browser aborted the request as it was a Cross-Origin Request w/o CORS. (Presumably an OPTIONS request should have been sent)
The popup on top-right shows that the request succeeded somehow.
Here is a screenshot of WireShark showing the Request response (served over Google AppEngine)
You can get the pcap file from here.
Also, notable is the fact that I don't see any OPTIONS request being made by the browser at all (which it should to check for CORS support).
Someone please help us solve this mystery.
Provided the request is a 'simple method' (GET/HEAD/POST) and the headers are all 'simple headers', then the browser can follow the 'simple' steps for the request, which don't include an OPTIONS pre-flight.

Hidden/invisible Ajax request?

Is it possible to write and create a JavaScript Ajax request witch cannot be catched by the Firebug plugin in Firefox?
I'm asking this because I can see on Facebook that there are no Ajax request going on, but still when I sent a message from another Account, the message box on the top will add the "1 unread message" indicator... How's even this possible to achive?
Thanks.
Firebug logs "standard" AJAX requests to the Console panel; these are requests initiated using ActiveX/XHR.
Other types of requests are happening, though - CSS loading, images, javascript, etc. These requests are logged in Firebug's Net panel. Note also that requests logged in Console also appear in Net.
JSONP is a cross-domain method of AJAX in which a <script> tag is added to the page. When the request completes, the loaded contents of the script tag are parsed as JSON. The reason this works is that you are "tricking" your browser into treating the request as a request for a javascript resource rather than an AJAX request, thus skirting cross-browser security restrictions.
Putting this all together, JSONP requests (as well as all other types of requests, listed here as well as all <iframe> requests) are logged on the Net panel rather than in the Console panel. This isn't a bug or a problem; understanding the way JSONP works it is logical that the request would only appear in Net.
When using jsonp as your data type your calls do not show up in Firebug.

Resources