deanagit / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

ie = !+"\v1" !? #409

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This tricky test is not future proof. What if MS will happen to fix their 
script interpreter in next version?
Please do not use such hacks in production code.

Original issue reported on code.google.com by mieli...@gmail.com on 30 Nov 2009 at 9:38

GoogleCodeExporter commented 9 years ago
See more here:
http://code.google.com/p/closure-compiler/issues/detail?id=47#c10

Original comment by mieli...@gmail.com on 22 Dec 2009 at 8:41

GoogleCodeExporter commented 9 years ago
There has been internal debate about this, and we may make a change in a future
release. I completely understand your viewpoint.

Changing issue type from 'defect' to 'enhancement'

Original comment by platelu...@gmail.com on 13 Jan 2010 at 4:16

GoogleCodeExporter commented 9 years ago
Such trick does not work in IE9 any longer. 

Original comment by igor.isr...@gmail.com on 29 Nov 2010 at 4:47

GoogleCodeExporter commented 9 years ago
interesting! this is a my website : http://fuckcopyright.net

Original comment by wordpresspremiumus@gmail.com on 23 Jan 2011 at 2:11

GoogleCodeExporter commented 9 years ago
Changing label from enhancement to defect since the !+"\v1" trick fails in IE9. 
 Also changing priority to critical.

Original comment by platelu...@gmail.com on 18 May 2011 at 4:44

GoogleCodeExporter commented 9 years ago
I ended up with

ie = eval("'\\v'=='v'")

Original comment by igor.isr...@gmail.com on 18 May 2011 at 10:52

GoogleCodeExporter commented 9 years ago

Original comment by platelu...@gmail.com on 20 May 2011 at 5:04

GoogleCodeExporter commented 9 years ago
/*@cc_on!@*/0
or
/msie/.test(u)

First one relies on conditional comments, and second would be tricked by 
browser spoofing.
And now that IE9 is so much more compliant, is it really worth detecting 
without the version?

Original comment by jhiswin on 20 May 2011 at 7:07

GoogleCodeExporter commented 9 years ago
Replaced Giammarchi's hack with navigator.appName check. Simple but effective.

Original comment by platelu...@gmail.com on 20 May 2011 at 10:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Is this going to be pushed to the repos, specifically the git repo?
Also, isn't using appName much longer?

Could add something to return version like the webkit detection does?
Something like:
"Microsoft Internet Explorer"==navigator.appName ? 
parseFloat(u.replace(/^.*msie (\d+(\.\d+)?).*$/, "$1")) : false
Because I really think IE9 is different enough that versions are really needed 
for detection to be useful.

Original comment by jhiswin on 21 May 2011 at 1:19

GoogleCodeExporter commented 9 years ago
Yes, it will go to GitHub when I'm done with some other work today.

appName is longer, but it's also less difficult to spoof. 

RE: returning version number, that's new functionality, and we're not currently 
looking to add new functionality.

Original comment by platelu...@gmail.com on 21 May 2011 at 1:59