views:

1055

answers:

1

Is there a way to check if flash is installed in Firefox from C# code on the server? For instance when the client browser is IE, you can check
Request.Headers["accept"].Contains ("application/x-shockwave-flash")
but a Firefox request doesnt contain the same header.

+4  A: 

Given you've tagged this as "server-side" and talk about the client's machine, then you may well be disappointed.

The only way to check this is with code running on the host you're checking (i.e. the client) - of course, you could do this and transmit the answer to the server (to store in the session, for example)

Edit: It's also worth remembering that any headers you receive (or rely on receiving) may be removed by intermediate proxies, or just plain lying (could be a bot)

Rowland Shaw
And then there are cases of flash installed, but disabled (e.g. Firefox's FlashBlock extension).
Richard
And then the problem with remembering this, what if they change to a browser without Flash after visiting with one that has Flash?
Samuel
I was assuming that the session handling was standard behaviour (I.e. auto-created for a request without a cookie; cookies expiring after first of: set time period or browser exit)
Rowland Shaw