We help IT Professionals succeed at work.

Flash Detection / BrowserHawke or Skip it?

pgkooijman
pgkooijman asked
on
445 Views
Last Modified: 2012-05-05
We are planning to add a flash element to the header of our website. This header is displayed on every single page so even though its not a vital element of site navigation it will load on every page. The flash is very light and does increase the attractiveness of our website considerably so we want to stick with it.

The question is if we would have to do flash detection or not?

a) According to MacroMedia 98% of users have Flash installed
b) If we use BrowserHawk to detect flash then we would have to detect it for ever single pageview or set a cookie/session variable. The detection requires an object to be loaded so we are worrying about memory issues, same goes for session variables and we generally do not like setting cookies.

What do you recommend and what is common practice right now?

A) Skip detection all together
B) Use BrowserHawk and initialise the object on every single page load
C) Run BrowserHawk once per session and use a cookie/session variable?

Thanks!
Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
Knowing that every visitor has an associated session ID, the only way I know to avoid the cookie or session var, is to make the check initially, and store the result in a server side database. Then, on each subsequent load, you could look up that session ID in the DB and display the flash or not. Fact is, the client/server relationship is a stateless connection, so only a few things can happen here:

1) Detect every request
2) Set a cookie after detecting once
3) Set a session variable after detecting once (which stores in a cookie)
4) Save detection based on session ID in DB and check against that
5) After detecting once, pass a value via querystring or hidden form variable on EVERY link

Commented:
The way I understand the question is that the goal is to detect if the user has the Flash Plugin installed on their computer and display the appropriate asset(Flash or JPEG) accordingly...

I think SWFObject takes care of the whole process so that you can just forget about the detection issue...

Maybe I am missing something here???

CyanBlue

Commented:
"The question is if we would have to do flash detection or not?"

Your method requires detection on every single load. I was providing alternatives to doing detection every time based on the comment:

"we would have to detect it for ever single pageview or set a cookie/session variable. The detection requires an object to be loaded so we are worrying about memory issues, same goes for session variables and we generally do not like setting cookies."

Commented:
Gotcha...  :)

I have used SWFObject for a couple of years and I have not had a case where the browser suddenly gets slow for that specific reason...  I cannot speak for everybody, but I think SWFObject is reasonably good/safe implementation...  That's my 2 cents on that...

CyanBlue

Commented:
And I agree with CyanBlue, I would go with SWFObject. If you suspect a memory leak, notify the developer with your concerns, and I'm gambling he/she will help you. If you go with a completely propritary solution, you could very well introduce your own memory leaks. 1/2 dozen one way, 6 the other I guess. ;)

Author

Commented:
Thanks for all the tips. Just one question: if the percentage of users is 98% should we even bother with detecting in the first place? We always like keeping our sites as clean as possilbe. I think the percentage of people who have JScript turned off is much higher than Flash's 98% so would that not mean that we would effectively be blocking more users?

Thanks!

Commented:
Well, dont block at all. If the detection fails, output a static image. If it suceeds, output the flash. Shouldn't have to exclude anyone.

Author

Commented:
What happens with SWFObject if the user has Jscrpt disabled? Will it still show the static image?

Commented:
Yes, NOSCRIPT takes care of that
CERTIFIED EXPERT

Commented:
just so you know...  the 98% statistic is not as accurate as you think...   look at the market penetration breakdown for the specific player you are targeting...  most projects should be using player 8, since it is the most advanced player that is above(or close to) the 95% level.

Also, if you are worried about detection, you might look into Express Install...  with Flash 7 or 8 it basically updates the plugin at runtime if the user has an over version.

rp

Commented:
That stat only gives you a general idea... and that result could be totally wrong depends on who your audiences are...  For example, if you are developing something for the school district, you could probably shoot for lower version of FP because they tend to take whole lot longer to update the plugins...  The individual computers do not have an admin power to update the plugin by the users and the IT person should do the upgrade, and it takes whole lot longer to decide whether they should really upgrade or not...  So, you got the idea...

FYI, the SWFObject has built-in capability/help to do the Express Install...  Check it out...  ;)

CyanBlue
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.