简体   繁体   中英

Web application performance with company proxy server

I have a strange issue that I've successfully narrowed down to my company's proxy server settings. However I cannot figure out what is going on and would like some suggestions to bring when I meet with our IT team.

I have an ASP.NET application which displays a table used to key in quantities for different products. Because there are many rows, I have a jQuery script which allows users to navigate with the arrow, tab, and enter keys like in Excel.

The issues arises when deploying the site to the web server on the intranet. While the site runs fine locally on my PC with IE, it is completely inoperable once published. I've narrowed down the issue to checking/unchecking the proxy server settings on my computer.

The table below shows the cumulative execution time of the script in milliseconds for 20 presses of the right arrow key in the grid. As you can see this issue only impacts Internet Explorer and only when the proxy is enabled. This behavior is reproducible on any other machine I've tried. The page won't function with the proxy so I cannot list a time.

性能表

I did notice that IE 9 is getting slightly different CSS files when on proxy vs non-proxy based on visual appearance. When I compared the code I noticed different CSS was being sent to the browser. I tried changing the script file names so that the proxy wasn't serving an outdated version and that did not help.

Proxy CSS Example

#entry_grid TD {
BORDER-BOTTOM: #ccc 1px solid; MIN-WIDTH: 75px; TEXT-ALIGN: center; PADDING-BOTTOM: 2px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; MAX-WIDTH: 75px; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 2px}

Nonproxy CSS Example

#entry_grid td {
padding: 2px 0px; text-align: center; border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid; min-width: 75px; max-width: 75px;}

Some odd things like capitalizing the text or changing around the padding shorthand to the more verbose version. Not sure if this is possibly related to other resources, like the jQuery library. The script itself however is identical. For those interested, the code which is causing issues is:

function convertInput(e) {
//Assign the active CSS class to the selected cell
$('.active').removeClass('active');
$(e).addClass('active');

//Ignore any elements which do not have an 'ID' tag since these should not be edited
var attr = $(e).attr('id');
if (typeof attr !== 'undefined' && attr !== false) {
    //Get the text value
    var text = $(e).text();
    $(e).text('');

    lastbox = activebox;
    //Create an inputbox and place the original value in there
    $('<input type="text" />').appendTo($(e)).val(text).select().blur(
        function () {
            var orig = $(this);
            var parent = $(this).parent();

            var newText = orig.val();
            parent.text(newText);
            updateMonthTotal(parent);
            parent.find('input').remove();
        });
}
else {
    //If we land on an non-updateable field, find the only input box on the table
    //and grab its value

    var elem = $('#allocation_entry_grid tr td:eq(' + lastbox + ') input');
    var newText = $(elem).val();
    //Assign it to the underlying TD and remove the textbox
    $(elem).parent().text(newText)
    $(elem).remove();
};

Finally, the kicker is that the proxy setting shouldn't even matter since the entire intranet is already excluded! I hid the real name in the screenshot below, but it does have an entry which should exclude my site

在此处输入图片说明

What is going on here? Why IE only, and is there something else I can do to test it out?

Edit

I put this already in a comment, but when inspecting traffic with Wireshark, the user agent changes in IE depending on the proxy setting:

With Proxy User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)

Without Proxy User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)

In both cases, there is 0 traffic to the proxy server. I can confirm this happens on any site I'm visiting from this computer by toggling this checkbox.

2 suggestions: 1. Use IE Tester to check if this only happens on IE9 or all IE 2. If you think IE acts differently between proxy/non-proxy, try moving the different part of css from external css file to your page. 3. If moving css/js solves your problem then you can try override the problem part of css part with !important.

let me know how this works for you.

As your work doesn't look like could be posted on jsfiddle so I can only shoot blind mate. Good luck anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM