You can use the user agent to get a rough idea. This is the browser not the device though so an iPhone and iPad will look the same. You can also get the screen resolution. The problem is that a tablet and same laptop can have the same resolution. I don't know of a universal way.
It's more efficient to write some sort of data into your page (eg. a JSON object) on the initial request. All the information Wurfl would use from the Ajax request is already available in the initial request, so why make an extra HTTP request to get the data? Also beware the licensing on Wurfl changed last year (controversially) so you now have to buy a license to use the database of devices, I recently switched to OpenDDR on the main project at work because of this.
Rob, What is your experience with using OpenDDR so far?
[I am going to use it (to get the width of the device; in physical length like millimeter) for total control (while still being fluid and complies to RWD) of the layout served (along with letting user override default layout).]
 It looks like the physical width is available in WURFL (not sure how reliable), but not in OpenDDR, nor in 51Degrees.
 Ill give in for now and not use server detection. (Hoping I wont need it till DeviceMap hopefully completes and is free).