Device detection CSS

How do I get my INDEX file to detect whether visitors are using a mobile device or laptop/desktop?
My site is a an interactive flash file and it works fine on desktops and laptops…but not at all whats ever on mobiles. How can I get my index to send viewers to either the flash site or another page that says “site viewable only on desktops”???
thanks

Browser sniffing is old practice. Nowadays you sniff by browser’s capabilities or, if it is a case of having enough room, by the width of pixels.

I don’t know any other way than using a programming language, mostly Javascript. Of course, if Javascript is disable won’t work but it makes sense using just front-end programming for this than backend. You’ll find plenty of scripts if you google it.

I edited your title to make it more descriptive

Hi the_dauntless_david welcome to the forum.

I thought that except for old niche sites (eg, online flash games) flash was pretty much a thing of the past.

That is. flash is likely to not work mobile or desktop.

Anyway, as molona has posted you do not want to do “device sniffing” but “feature detection” if at all.

Last I knew there was a way using HTML so that if the flash failed alternate content would be displayed.

In this case the alternate content could be the “flash needs to be enabled” text.

What does the HTML for the flash look like?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.