window.screen.width and window.screen.height not working on iPad 2
===

I'm using the functions

    window.screen.width
    window.screen.height

to detect the screen resolution of the user.
They work like a charm on PCs, but they don't on iPad 2.
They output 768 and 1024 instead of 2048 and 1536.

Can somebody help me, please?
Thank you in advance