drake035 drake035 - 5 months ago 3x
HTML Question

iPad physical orientation doesn't have any effect

I understand that "portrait" iPad orientation corresponds to a window 1024px wide, and 768px for "landscape".

However I have always the same width regardless of my iPad orientation when I visit my web page.

At the left bottom, the number in red color represents the value of

connected to the
JS event. Why does the value remain the same in both portrait and landscape modes?


You need to add initial-scale=1 to your meta viewport tag. See this related question: Viewport meta tag for ios devices