title: IE11: different user agent strings for different requests, same web app
body: <p>I have IE11 running in compatibility mode, to load a page it performs several requests (for css, js and so on). Sometimes it uses user agent </p>
  
  <blockquote>
    <p>Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko</p>
  </blockquote>
  
  <p>and sometimes </p>
  
  <blockquote>
    <p>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)</p>
  </blockquote>
  
  <p>which makes my application think that someone tries to use hijacked session id and invalidate the session. I've tried several document modes (Edge, 10,9,8,7), behavior is the same.
  If I turn off compatibility mode, everything works fine but It looks like a very strong restriction (IE on work machines is typically configured to work in compatibility mode at least for intranet sites, which my app is going to be). </p>
  
  <p>So, the question is: <strong>is there anything I can do from the web application side to deal with this issue, except for turning off session hijacking protection?</strong></p>
  
  <p><strong>Update</strong></p>
  
  <p>This thing doesnt always happen for the specific 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 app invalidates the session.</p>