Is it possible to get the screen resolution of the device? screen.width/height does not work…
Alternatively, how can I differentiate between the iPhone/2G/3G/3GS and the iPhone 4's resolution?
For resolution try
For device detection I think this might help
This should give you some ideas: