detecting compatibility mode IE


Can anybody suggest if there is a way to detect if the compatibility mode has been turned on in the IE 9? Is there any vaadin way of doing this?All I want to do is turn off the compatibility mode if its on.
Thank you

Here is a similar thread:!/thread/290047

Thank you, that really helped.