Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
The only script in your HEAD.
JavaScript CSS
tag: v0.97a

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Head JS

This project was never announced. git push and it was all viral.

The website:

v0.97a / 2012-10-20

Report a Bug.


  • Updated QUnit & got unit tests running again
  • Swictched to "use strict"
  • Fixed up some variable usage
  • Added browser detections other than just for ie-lt
  • updated browser regexes (firefox, safari, opera, ios, android, webkit)
  • detect if browser is: desktop, mobile, touch enabled
  • detect portrait/landscape mode
  • html5 shim now only triggers on ie-lt9
  • added a throttle to onResize, since some browsers fire tons of events/sec
  • added corrected height/width measurements, but only exposed via new object: head.screen
    • contains height/width, innerHeight/innerWidth, outerHeight/outerWidth
  • force all css router names to lowercase just in case ppl try typing in names with wierd casings


  • In the immediate future i would like to patch up things that have been sitting on hold, and that people already using HeadJS can continue to use without any breaking changes.
  • After that however things will likely change a bit
    • Have a peek here HeadJS@I-Technology
    • For example :
      • Programatically it's very had to use the current syntax of prefixig things with no-. Instead they should be suffixed with -true/-false. Like this it is very easy to generate variable on the fly and have them match your HeadJS rules.
      • Currently screen detection is based on the outerWidth of the navigator window, so once you add tabs, scrollbars, sidebars, & toolbars are probably in for a big surprise with your design! Therefore generated classes should instead reflect the actual screen estate availiable: innerWidth/innerHeight
      • Right now you only get classes based on lt, but what about lte, gt, and gte ? Not to mention height ! :)

Rebooting HeadJS,

This project was sitting idle for the last year or so, but me Robert Hoffmann and Paul Irish have just gotten the green light from Tipiirai to try and keep the project alive a bit more :)

There will be a few questions to work out, but i think that HeadJS still solves the basic problems that many users are experiencing. Especially in the Enterprise, where we must support obsolete browsers while moving forward with our time.

  1. Feature detection
  2. Script loading
  3. Responsive design
    • HeadJS handles this very well through css classes
    • But there are other solutions like Respond.JS that work well too.
  4. Browser detection
  5. Plug browser quirks

Since points 1 & 2 seem pretty well covered, going forward we will need to decide if these functionalities should be removed or not from HeadJS, to we can concentrate on the points that HeadJS handles well: 3-5

If you're like me, and need to support browsers like IE6+, FF2+, and think head.js does a great job emulating responsive design, while letting you plug the odd bugs and quirks of your least favorite browsers...

then stay tuned :)

Something went wrong with that request. Please try again.