3

I have a customer who is losing their session. They are on Windows 7 and using Internet Explorer 9. I think I've widdled it down the user agent changing when compatibility mode or chrome frame kicks in, but I wanted to see if anyone else had an opinion.

If it does in fact have to do with a user-agent mismatch, is there a way, and would it even be acceptable to disable user-agent matching on sessions?

Thanks for your help!

0

3 Answers 3

5

This is a bit of a vague question but it appears that IE does send different UA strings when compatibility mode is enabled and EE (or rather CodeIgniter) does invalidate sessions by default if the user agent changes.

I've never tried this but by the look of it you can change this behaviour by editing this setting in system/expressionengine/config/session.php:

$config['sess_match_useragent'] = TRUE;

As for whether you should change this, it seems unlikely that people are switching compatibility view on and off mid-session with any frequency, but if it's something that is regularly impacting an important user then maybe there is an argument for changing it, particularly if you've already done quite a bit of debugging and there's no simple way of stopping their UA from changing all the time. It does seem like a bit of an odd problem to have though - solving that would probably be preferential.

2

In additional to Dom Stubbs suggestion if you change to using Cookies only does that help?

go to: Admin > Security & Privacy > Security & Session Preferences and then change the User Session Type.

0

I was able to fix this by removing "chrome=1" from the http-equiv meta tag. What I think was happening was for whatever reason, the homepage would load initially with just the "IE=Edge" property and then when they logged in, Chrome Frame would kick in, changing the user-agent and breaking the session. No clue if/why that is even possible, but it's a theory! :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.