What is the advatange of using Head.js screen size detection over CSS3 media query?
Head.js Screen size detection
.lt-1024 #hero { background-image:(medium.jpg); }
CSS3 @media query
@media only screen and (max-width: 1024px) {
#hero { background-image:(medium.jpg); }
}
If it’s just a matter of CSS vs JS choice, which one is more trustworthy for mobile design?
CSS media queries are not supported by all mobile browsers (see Browser compatibility – viewports). That’s why it could help to have another indicator.
But you can not only use this for mobile web sites but also for web site for desktop web browsers.