Dev.Opera - Follow the standards, break the rulesDev.Opera - Follow the standards, break the rules

Login

Lost password?

Forums » Article Discussions

Discuss the articles posted on Dev.Opera.

Note: You need to login to post in the forums. if you don't have an account you first need to sign up.

By blooberry anchor Friday, 12. December 2008, 12:16:00

MAMA: Scripting report, part 1: Basic scripting syntax and features

This week Brian Wilson lifts the lid off the last section of MAMA's research - scripting. In this "bite-size" report, he looks at the methods used to collect script data by MAMA, most popular scripting constructs and script libraries, frequency of usage of different methods for including JavaScript in a page, and more. He even looks at how much VBScript is still out there on the Web.

( Read the article )

By Andrew Gregory anchor Friday, 12. December 2008, 13:00:59

avatarI got to the part where you looked for references to specific browsers in script, and immediately realized there was a rather notable absence: "Netscape".

By blooberry anchor Sunday, 14. December 2008, 19:22:12

avatar

Originally posted by Andrew Gregory:

I got to the part where you looked for references to specific browsers in script, and immediately realized there was a rather notable absence: "Netscape".

This is a good point, and I've tried to figure out why I would have ignored it. It IS a very obvious omission and I think I would have noticed that during development. :smile:

I'll definitely add a separate detection for "Netscape", and I'll also store the browser groups like "Mozilla", "Gecko", "Firefox" into separate instances so the use of each type of keyword can allow the indication of even finer detail.

I think I'll also add a detection for the substring "iphone" - can anyone think of any other really interesting substrings that could indicate authors allowing for other specific browsers?

Thanks Andrew!

By blooberry anchor Sunday, 14. December 2008, 19:26:35

avatarHistorically, "Netscape" is a commonly returned value for the JavaScript Navigator object .appName property. This may have been why I omitted it from the substring search. It doesn't explain why I included "Mozilla" in my group for Firefox, because it is historically returned by most browsers in the Navigator .appCodeName and .userAgent properties.

Separating out the counts for each of these substrings should help clarify these usages in the future.

By Andrew Gregory anchor Monday, 15. December 2008, 02:03:20

avatarAbout the only other strings I could suggest would be "Microsoft", "WebKit", and "KHTML". I don't know why you're concerned about appName vs appCodeName vs userAgent. They're all in script, and all of potential interest.

By blooberry anchor Monday, 15. December 2008, 06:06:37

avatar

Originally posted by Andrew Gregory:

I don't know why you're concerned about appName vs appCodeName vs userAgent. They're all in script, and all of potential interest.

Agreed. :smile:

I only put that out that as a possible reason I might have ignored "Netscape" in the first place. In retrospect, I feel differently. :D

I'll add detections for all those strings now.

By dstorey O anchor Sunday, 21. December 2008, 12:08:41

avatarIf you're going to search for the "iphone" substring, you may as well also search for "Opera Mini" and "Opera Mobi" (newer versions of Opera Mobile), as well as iPod Touch.

Moderators: pepelsbey | dstorey | mcx | operadev | chrismills | shwetankdixit | brucelawson | iheni | andreasbovens | zibin | mollydotcom