Media quiry not working in portrait in android 10 inches tab on second time


Is it only iphone and ipad? I have used in android 10 inches tabs. I have used ionic

@media only screen

and (min-device-width : 768px)

and (max-device-width : 1024px) {

//here is my style


But problem is that on first time it is working fine. When i move to
landscape it also works. But again i move to portrait my tab then it
does not work. Always landscape works. But from second time portrait
does not works all.

Please help me…