Check the version of Safari on an iPhone or iPad

Start Safari and enter this string into the URL box:

javascript:alert(navigator.userAgent)

The response should be something like this:

Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5

The browser version is highlighted.

Blah, blah, blah