Testing for Flash capability on the server-side

后端 未结 6 953
独厮守ぢ
独厮守ぢ 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:53

    You should not be dealing with this on the server side. Most Flash detection/embedding scripts do this sort of behaviour by default. I highly recommend SWFObject.

    • Create a
      with your image (or any html you want really) inside it
    • Give it an ID eg:
    • Tell SWFObject to override that div block with a Flash player

    If they have disabled, they see the unchanged html. If they have javascript enabled but no Flash plugin, they see the html as well. Basically, they'll see the Flash only if they have javascript and the Flash plugin.

    That's about as good as it gets.

提交回复
热议问题