Testing for Flash capability on the server-side

后端 未结 6 999
独厮守ぢ
独厮守ぢ 2021-01-14 23:23

I\'m developing an ASP.NET website that will need to support non-flash users.

In case the user\'s browser doesn\'t support Flash, or they have Flash disabled, I\'d l

6条回答
  •  灰色年华
    2021-01-14 23:54

    You might try using some server var:

    'HTTP_ACCEPT' against 'application/x-shockwave-flash'

    Not sure about .NET but it works most of the time in php. This does not work in Safari but for what you're doing that should be fine. You'll be saving yourself some bandwidth 95% of the time. PHP example(not .NET but you get the idea):

    if (strstr($_SERVER['HTTP_ACCEPT'], 'application/x-shockwave-flash')){
        $hasFlash = true;
    }
    

提交回复
热议问题