简体   繁体   中英

How does one correctly identify IE10 Metro and IE10 Desktop from the server in order to send back a “finger friendly” or “mouse friendly” interface?

I've read that since user agent is the same between both, the recommend method is to use feature detection. That is fine and good for some situations, where you may want to display a Flash video/movie/app vs. a javascript slideshow, but my issue is to display a correct interface based on the user's input device.

The assumption I'm making is that if a user is in the "Metro" IE10 they are probably expecting to use their fingers instead of a mouse. That being the case, I'd like to give them an interface with large hit boxes.

My question: Is there a way to tell the difference and display an appropriate interface? Or am I stuck with making the user manually switch modes via links on my site that set a cookie?

Still there's no way to detect normal IE from the crippled Metro IE, but know you can know at the server if the user has a touch screen http://blogs.msdn.com/b/ie/archive/2012/07/12/ie10-user-agent-string-update.aspx

That post includes other comments about how to perform detection in javascript.

If you use the msPointerPoint interfaces, your client will receive the same messages whether they're using the mouse or touch. You can also use the gestures api - there was just a blog post on the IE blog which discusses how to use gestures from the mouse browser.

IE exposes a unified stack for messages so you can use the same input processing and your UI will work whether you're using touch/pen or mouse.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM