Mobile browser statistics: JavaScript and CSS on the go?
Posted 2007-10-07 in Mobile Web by Johann.
Edit: There is now a newer blog post about mobile web statistics.
I tried to find out which popular mobile browsers support CSS and JavaScript.
Mobile browser list
Here are the top 11 mobile browsers.
Why 11? The last one is too interesting to pass up.
- 1. Mozilla/4.0 (PSP (PlayStation Portable); 2.00)
- 1032 requests.
Based on Access NetFront. Does basic CSS and JavaScript. Needs special linking forhandheld
style sheets. - 2. Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder;)
- 852 requests.
These are mobile phones connecting through Google’s Wireless Transcoder. This could be an education issue – apparently people don’t expect “regular” websites to work in their mobile browsers. - 3. Opera/9.10 (Nintendo Wii; U; ; 1621; en)
- 390 requests.
Based on the desktop Opera browser. Great CSS and JavaScript support including AJAX. - 4. Opera/8.01 (J2ME/MIDP; Opera Mini; en; U; ssr) UP.Link/6.3.1.13.0
- 292 requests.
An older Opera mini version. Basic CSS support, no JavaScript. Minor issues. - 5. Opera/9.50 (J2ME/MIDP; Opera Mini/4.0.8993/58; U; en)
- 210 requests.
The latest version of Opera Mini. I haven’t tried it out yet but I doubt it does JavaScript. - 6. Opera/8.01 (J2ME/MIDP; Opera Mini/3.1.7203/1710; en; U; ssr)
- 124 requests.
Yet another Opera Mini. - 7. Mozilla/5.0 (Danger hiptop 2.4; U; AvantGo 3.2)
- 94 requests.
Requests bothscreen
andhandheld
CSS as well as Java Script. - 8. Mozilla/5.0 (Danger hiptop 3.3; U; AvantGo 3.2)
- 54 requests.
Identical requests to hiptop 2.4. - 9. Mozilla/5.0 (PLAYSTATION 3; 1.00)
- 41 requests.
Also based on Access NetFront. Does basic CSS and Java Script. Linking CSS is also different. - 10. Mozilla/5.0 (PDA; NF34PPC/1.0; like Gecko) NetFront/3.4
- 34 requests.
The latest NetFront version. Better CSS and Java Script support? - 11. Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko)
- 12 requests.
The iPhone’s browser is based on Safari which does CSS and JavaScript (possibly very well).
This list was generated from the last four weeks of log files.
JavaScript
JavaScript for mobile browsers is still experimental. While half of the hits were made by browsers that support Java Script to some extent, relying on it probably can’t be recommended at this time. AJAX is clearly not recommended.
CSS
Support for the handheld
media type in the mobile browsers listed here is surprisingly good however. Note I am not talking about what CSS properties are supported, just that linking works.
NetFront is the only browser that doesn’t request the handheld
CSS media type and insists on screen
.
IEMobile/Pocket Internet Explorer on Pocket PC/Smartphone/other PDAs and the Danger hiptop load all style sheets. The method described in linking CSS for handheld devices revisited should be used for these browsers.
inc: A super-tiny client-side include JavaScript jQuery plugin
Posted 2007-10-04 in JavaScript by Johann.
Is 2007 2015 going to be the year of the JavaScript client-side include? After Mark Nottingham’s HInclude and the equally cool purple-include, I thought it was time to do something new.
How about
- declarative inclusion of remote content
- pre- and post-inclusion callbacks to transform content
- all this in less than 250 B after GZIP?
inc does this.
Demo
- Replace this text with a mildly amusing text.
- Include another text snippet and uppercase it.
- This pseudo text will be replaced on load.
- Test callback method.
Usage
Add the inc JavaScript after a recent jQuery build.
<script type="text/javascript" src="jquery-1.6.3.js"></script> <script type="text/javascript">(function(a){a.fn.inc=function(b,c,d,e){return this.length&&b?this.each(function(){e=a(this);a.ajax({url:b,success:function(f,g,h){e.html(a.isFunction(c)?c(f,b):f);a.isFunction(d)&&d(b,g,h)}})}):this};a(function(){a('[class*="inc:"]').each(function(){var b=/inc:(\S+)/.exec(this.className||"");b&&a(this).inc(unescape(b[1]))})})})(jQuery);</script>
I recommend inlining the script since it’s so small. If you have your own scripts to concatenate and minify JavaScript files, you can download jQuery inc in its uncompressed form.
Automatic inclusion
If you would like to have some content automatically included once the page is loaded, use the inc
CSS class and add the resource to load. The URI must be URL-encoded.
<p class="inc:footer.html">This text will be replaced with footer.html</p> <p class="small inc:footer.html inactive">This text will be replaced with footer.html as well</p> <p class="inc:la%20la%20la.html">This text will be replaced with “la la la.html”</p>
Programatic includes
You can use the jQuery.inc
function to include resources. It takes three arguments, the URL to load, an optional function that is called with the content of the URL and an optional function that is called once the content is included.
<p onclick="$(this).inc('something.html');">Include something.</p>
$('#bla').inc('bla.html', function(a) { return a.toLowerCase() }); $('#bla').inc('bla.html', null, function() { alert('content is now live') });
License
History
I have been doing client-side includes for a while on my home page and later on the “page not found” page.
Changelog
- 2015-02-13: Updated and checked with various jQuery versions between 1.2.6 and 2.1.3. Removed alternative code for IE because jQuery can use the native XMLHttpRequest object instead of ActiveX controls.
- 2011-09-11: Update for newer jQuery versions plus various optimizations. Saving almost 100 B.
- 2008-01-22: Pages would even be included if no elements were matching. Added post-inclusion callback.
- 2007-12-19: Fixed two bugs in Internet Explorer.
- 2007-12-11: jQuery 1.2 broke inc.
- 2007-10-09: Made even smaller and used more jQuery functionality.
- 2007-10-04: Initial release.
8 comments
Legendary guitar effects: Ibanez Standard Fuzz
Posted 2007-09-26 in Effects by Johann.
The Ibanez Standard Fuzz, pictured here with the Univox Super-Fuzz, is another one of those crazy 70’s fuzzes.
Its octave is very noticeable. Not a clean octave-up though – a fuzzy one.
“Tone Change”!
Just like the Superfuzz, the Standard Fuzz also offers two tone settings. One with a ton of mids that sounds very rich and another one that is mostly bass and treble.
Audio clips
The sample starts with a clean sound, then the Standard Fuzz is switched on with the mid-heavy sound in use. Later, the no-mids mode is on and pickups are changed. The guitar is an Ibanez 2027XVV.
This much Nutch is too much Nutch
Posted 2007-09-17 in Spam by Johann.
Nutch is like giving free TNT sticks to children.
In theory it could be used for useful things.
In reality most of it’s users appear to be scrapers and wannabe-search-engines.
Nutch bot user agents
I searched half a year worth of logfiles for Nutch
crawlers:
//Nutch-0.9-dev (compatible; SynooBot/0.9; http://www.synoo.com/search/bot.html)
Bigsearch.ca/Nutch-1.0-dev (Bigsearch.ca Internet Spider; http://www.bigsearch.ca/; info@enhancededge.com)
Bloodhound/Nutch-0.9 (Testing Crawler for Research - obeys robots.txt and robots meta tags ; http://balihoo.com/index.aspx; robot at balihoo dot com)
CazoodleBot/Nutch-0.9-dev (CazoodleBot Crawler; http://www.cazoodle.com/cazoodlebot; cazoodlebot@cazoodle.com)
CS/Nutch-0.9
disco/Nutch-0.9 (experimental crawler ... please email imagine@gmail.com if problems observed; imagine@gmail.com)
disco/Nutch-0.9 (experimental crawler ... please email imagine@gmail.com if problems observed; nedrocks@gmail.com)
Firefox/Nutch-0.8 (Test Robot; winyio@ustc)
HD nutch agent/1.0
HPL/Nutch-0.9
ilial/Nutch-0.9 (Ilial, Inc. is a Los Angeles based Internet startup company. For more information please visit http://www.ilial.com/crawler; http://www.ilial.com/crawler; crawl@ilial.com)
ilial/Nutch-0.9 (Ilial, Inc. is a Los Angeles based Internet startup company.; http://www.ilial.com/crawler; crawl@ilial.com)
ImageShack/Nutch-1.0-dev
infomisa/Nutch-0.9
Krugle/Krugle,Nutch/0.8+ (Krugle web crawler; http://corp.krugle.com/crawler/info.html; webcrawler@krugle.com)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.01/Nutch-0.8.1 (http://lucene.apache.org/nutch/about.html; http://lucene.apache.org/nutch/bot.html; mail@dev.null)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.01/Nutch-0.9 (http://lucene.apache.org/nutch/about.html; http://lucene.apache.org/nutch/bot.html; mail@dev.null)
MQBOT/Nutch-0.9-dev (MQBOT Nutch Crawler; http://vwbot.cs.uiuc.edu; mqbot@cs.uiuc.edu)
Nutch/Nutch-0.8.1 (Nutch; Nutch; Nutch)
Nutch/Nutch-0.9
NutchCVS/0.7.1 (Nutch; http://lucene.apache.org/nutch/bot.html; nutch-agent@lucene.apache.org)
NutchCVS/0.7.2 (Nutch; http://lucene.apache.org/nutch/bot.html; nutch-agent@lucene.apache.org)
NutchCVS/Nutch-0.9 (Nutch; http://lucene.apache.org/nutch/bot.html; nutch-agent@lucene.apache.org)
NutchForUW/Nutch-0.9 (Nutch agent; http://lucene.apache.org/nutch; test at nutch dot org)
Pluggd/Nutch-0.9 (Pluggd automated crawler; http://www.pluggd.com; support at pluggd dot com)
sait/Nutch-0.9 (SAIT TEST AGENT; http://www.sait.samsung.co.kr)
tellbaby/Nutch-0.9 (www.tellbaby.com)
tellbaby/Nutch-1.0-dev (http://www.tellbaby.com)
TestCrawler/Nutch-0.9 (Testing Crawler for Research ; http://chitchit.org/TestCrawler.html; amitjain at spro dot net)
WannesWeb-Group Agent/Nutch-0.9 (Agent de recherche pour le moteur WannesWeb-Group; www.wannesweb-Greoup.com; agent@wannesweb-group.com)
Webscope/Nutch-0.9-dev (http://www.cs.washington.edu/homes/mjc/agent.html)
wectar/Nutch-0.9 (nectar extracted form the glorious web; http://goosebumps4all.net/wectar; see website)
yggdrasil/Nutch-0.9 (yggdrasil biorelated search engine; www dot biotec dot tu minus dresden do de slash schroeder; heiko dot dietze at biotec dot tu minus dresden dot de)
Nutch? No, thanks.
Some of these user agent strings do not even contain an email address. Others are attempting to fake existing user agents.
Stopping Nutch
Nutch-based crawlers can be blocked by filtering out all user agents containing Nutch
or nutch
. In lighttpd, this looks as follows:
$HTTP["useragent"] ~= "(Nutch|nutch)" { url.access-deny = ( "" ) }
10 comments
Pages
Page 13 · Page 14 · Page 15 · Page 16 · Page 17 · Page 18 · Page 19 · Next Page »
Subscribe
RSS 2.0, Atom or subscribe by Email.
Top Posts
- DynaCloud - a dynamic JavaScript tag/keyword cloud with jQuery
- 6 fast jQuery Tips: More basic Snippets
- xslt.js version 3.2 released
- xslt.js version 3.0 released XML XSLT now with jQuery plugin
- Forum Scanners - prevent forum abuse
- Automate JavaScript compression with YUI Compressor and /packer/