by default there is no way to do this, but if you are comfortable working in a shell (for example, Terminal.app), you can see something like this command line tool:
https://github.com/fingertips/ios-sim
not sure if you can run embedded applications like safari, tho.
One thing that can be useful is that in desktop safari, if you turn on the Development menu, you can set up your user agent on iphone / ipod touch / ipad. I'm not sure how accurate this is, but it could be faster for iteration. (if you do not see the "Development" menu in the safari on your desktop, go to settings, select "Advanced" and make sure that the "Show menu in the menu" checkbox is selected)
source share