IE11: different user agent strings for different requests, the same web application

I have IE11 working in compatibility mode, it performs several requests to load a page (for css, js, etc.). Sometimes it uses a user agent

Mozilla / 5.0 (Windows NT 6.1, WOW64; Trident / 7.0; rv: 11.0), as Gecko

and sometimes

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.2; .NET4.0C; .NET4.0E)

which makes my application think that someone is trying to use the captured session id and terminate the session. I tried several document modes (Edge, 10,9,8,7), the behavior is the same. If I turn off compatibility mode, everything will be fine, but it looks like a very strong limitation (IE on working machines is usually configured to work in compatibility mode, at least for intranet sites, which will be my application).

So the question is: is there anything I can do on the part of the web application to solve this problem, with the exception of disabling session capture protection?

Update

This thing does not always happen for a particular page, I can open it 4 times and nothing happens, but for the fifth time IE sends Mozilla / 5.0 instead of Mozilla / 4.0, and the application invalidates the session.

+4

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


All Articles