I am currently building a responsive website which I decided to test on my Galaxy Ace 2. I am using media queries to change various elements at different window / browser sizes. One such change triggers between the portrait and landscape sizes on my Ace 2. If I view my website in landscape orientation and then rotate to portrait, the Ace 2 sometimes keeps the CSS used in landscape mode, and vice versa.
The only solution I have found is to reload the window:
Code JavaScript:
window.onresize = function(event)
{
    document.location.reload(true);
}
But this creates a delay every time the device is rotated.

Is there anything I can do about this?

Thanks,
TM.