How to track down an HTTP request?

Trying to optimize one web project.

It uses asp.net (webforms), a bunch of jquery plugins, and more.

Problem: There is an unnecessary HTTP request for localhost/undefinedand each request takes ~ 1 s longer than necessary.

Question: is there any tactic to find the culprit code?

Clue: undefinedmakes me think that JS is involved.

Firebug Magazine:

GET / undefined HTTP / 1.1
Host: localhost: 17817
User-Agent: Mozilla / 5.0 (Windows; U; Windows NT 6.1; lv; rv: 1.9.2) Gecko / 20100115
Firefox / 3.6
Accept: image / png, image /; q = 0.8, /; q = 0.5
Accept-Language: lv, en-us; q = 0.7, en; q = 0.3
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-13, utf-8; q = 0.7, q = 0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http: // localhost: 17817 / Default.aspx


if you right-click a line in the code, it gives a conditional breakpoint. Check the name of the variable that has the URL value and set the condition when typeof URL === 'undefined' or url === 'undefined' and look at the stack

breakproint 3400 ( ). .

3397 ajax: function (s) {
3398// , 's', 3399// ( , )
3400 s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));


= > 1 ascx, jquery .


. , , - . ...

+3
2

, JS- ? Firebug, , AJAX. - $.post() ​​ jQuery, - Firebug, , JS.

+1
0

Source: https://habr.com/ru/post/1734417/


All Articles