I couldn't find any relevant post about this mysterious behaviour anywhere else so excuse me if there's an obvious answer.
I am testing an application in various browsers and IE 11 has some strange behaviour.
When I visit a site that tells me my user agent I get:
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Which is standard for IE11.
However when I run my application the user agent is different only on IE11.
I tried debugging the application on IE11 by adding in Global.asax:
protected void Application_BeginRequest()
{
var ua1 = Request.Headers["User-Agent"];
var ua2 = Request.UserAgent;
}
Both of them show:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.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)
Chrome shows the same on both cases but IE 11 shows different user agents depending whether I am in my application or any other tab. So my application seems to affect the user agent somehow but only when viewing it with IE11.
Can someone explain this and tell me how to get the same user agent even via my application? Any idea why this is happening?
Ideally I want when debugging to get the expected user agent:
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Do you by any chance have the F12 Developer Tools window open and the browser emulation set to IE7, or the user agent spoofing set to Internet Explorer 7?
You can find it in the Emulation tab of the tool.
Alternatively, if that is not set, have you checked if IE is running in "Compatibility Mode" - as it may be set to do this for intranet sites. If so, this question is a likely duplicate of:
IE11 User-Agent - Wrong one when pointing towards localhost - Right one when going towards my PC name?
and also:
IE 11 sends different User-Agent header to different subdomains
My application is quite ok in Forefox. But it doesn't work in IE 8.
Error------
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Tablet PC 2.0)
Timestamp: Sun, 13 Jan 2013 04:52:47 UTC
Message: 'isModel' is null or not an object
Line: 21
Char: 452607
Code: 0
URI: ...://localhost:8088/rdptpl/static/js/ext/ext-all.js
I don't know where is my problem. Pls help.......
This may be because of HTML5 features in IE. Here is the webpage to test html5 features in browsers. Could you please gives brief about HTML5 features used in your ExtJS application.
There are some HTML5 features implemented in ExtJS like Closable tabs, WebSQL, Local Storage and etc. ExtJS has alternate code for browsers to implement some of them HTML5 features. Local Storage and WebSQL can't be implemented in Internet Explorer.
Let me know
There are many that suggested that.
Well, everytime I do something it's always get changed back to nothing.
WebClient.Headers(HttpRequestHeader.UserAgent) = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; EasyBits GO v1.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; Tablet PC 2.0; InfoPath.3)"
content = WebClient.DownloadString("http://www.google.com/search?q=kucing") 'doesn't work but working at firefox
There is a solution for C#
http://codehelp.smartdev.eu/2009/05/08/improve-webclient-by-adding-useragent-and-cookies-to-your-requests/
But c'mon. Do we really have to do so?
Yes you need to extend the WebClient class to get access to some of the goodies inside.
Just add the example class in your link to your project and use that instead of webclient. You can remove RefreshUserAgent() as all this does is pick a random user agent each time you call it.
I have been creating Sharepoint application page, which is deployed in Sharepoint 2010 14\TEMPLATE\LAYOUTS directory. In browser my page is working fine. But on the page i am using asp:FileUpload control for uploading images.
there is a javascript function, which i change image src/path when asp:FileUpload onChange event is called. this is working also fine.
Now the problem is, after changing image src/path through javascript onChange event. Page postback is causing an error like,
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64;
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
3.0.30729; .NET4.0C; .NET4.0E; InfoPath.2) Timestamp: Thu, 13 Oct 2011 13:08:03 UTC
Message: Access is denied.
Line: 350 Char: 9 Code: 0 URI:
http://saif-pc:81/WebResource.axd?d=0a7ZWROgcpePPy6XDUEhLl9SVCuQxHFrPdtua4kZN2U8VKZ9a4kNK11sx9E5Ae_oIgpqGL4O9QaXCripQx59D309Yoc1&t=634208957469717278
I have spent much time on googling, but not find any solutions.
Please any one help me.
Thanks in advance.
I have created a simple JSF image browsing app, and I'm having a problem with firefox.
The app itself is running inside Tomcat. The pictures are stored in a directory that is served by Apache. I've got 9 pictures that get shown on a page. The servers are on a machine separate from the client. When I try to load the page in firefox, usually 6 of the pictures will load almost instantly (< 500ms). The other three will take between 15 and 20 seconds to load. Looking at the apache logs, it seems like firefox isn't requesting those three pictures until the 15-20 seconds have passed - that is, I see 6 requests at the same time, then 15 seconds later the other three. I have tried the site in internet explorer, and IE doesn't have this problem; it loads all 9 pictures right away. I've tried a few different machines, and have the same results. The html is rendered very quickly, < 200ms, so I don't think this is a JSF issue (especially since the pictures are served from apache).
The numbers aren't always the same either - sometimes it will load 8 images, sometimes 7, sometimes the second batch of requests will all come at once, and sometimes it will load 2 more, than one more, etc. I'm not sure if this is a firefox setting, or a bug, or if there's anything server side I can do about it, but I thought that I'd throw it out there and see if anyone has any ideas I can try.
If it helps, here's an apache log line from firefox
192.168.1.30 - - [04/Mar/2009:14:25:40 -0500] "GET /work/DSCF0185_thumbnail.jpg HTTP/1.1" 200 7902 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)"
and one from IE
192.168.1.30 - - [04/Mar/2009:14:34:14 -0500] "GET /work/DSCF0179_thumbnail.jpg HTTP/1.1" 304 - "http://192.168.1.83:8080/app/browse.jsf" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322; MS-RTC LM 8; Windows-Media-Player/10.00.00.3990; FDM; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
Edit
I got the timings from Firebug - it's showing that the entire request is (for example) 18 seconds, with 17.9 seconds "recieving data", and the rest taken up in queuing. I'm not seeing the actual request in the Apache log until the end of that 17.9 seconds though, which leads me to believe it's a firefox thing, especially since IE doesn't show the problem. If it were in the server, I would expect to see the problem in both browsers.
Pipelining in firefox is turned off.
As was pointed out, my IE log shows it's hitting the cache - my mistake, grabbed the wrong part of the log file. Here's a clean log line - even after a cleared cache, IE doesn't show the same problems as firefox.
192.168.1.30 - - [04/Mar/2009:15:52:18 -0500] "GET /vantagework/DSCF0189_thumbnail.jpg HTTP/1.1" 200 5805 "http://192.168.1.83:8080/vantage/browse.jsf" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322; MS-RTC LM 8; Windows-Media-Player/10.00.00.3990; FDM; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
Use Firebug's "Net" console to check whether it is firefox, or the webserver, as your webserver might be taking it's time to accept the connections.
Firebug's "Net" console will show you when it starts requesting things, and give you a detailed breakdown of the different parts of requesting the image (queuing, etc etc)-
According to your log snippets, IE is retrieving the image from cache, Firefox is getting it from the server. So if there is something wrong with the server configuration that is delivering the image slowly, you will only see similar behaviour in IE if you clear the cache first, so I'd try that to verify that non-cached images do indeed take different amounts of time to download between Firefox and IE.
The other thing I would check is to see whether you have pipelining enabled in Firefox. If you do, I'd suggest you disable it, it maybe be causing a problem for your server.
It turns out that this was caused by my apache configuration. Some tuning adjustments had been made, and reverting to the out of the box apache configuration fixed the problem.