Reponsive design and the iPad viewport

I had been noticing that the iPad’s viewport in webkit browsers was odd but I couldn’t put my finger on it.

So I opened Safari on the iPad and ran some JS in firebug lite; the result: 768×504 in landscape and 768×928 in portrait mode.
Not what I expected at all.

The code I ran in firebug lite was:

alert(jQuery(window).width() + 'x ' + jQuery(window).height());

(prepend javascript: for use in the URL bar)

Bottom line: the viewport width is 768px in both portrait and landscape mode. That’s a little odd.