News for hackers. Stuff that matters.
Re:My Current HTML Boilerplate by dan1234 on Tuesday April 27, 2021 @02:51AM (#26952844)
I first saw that technique used by Moderinizr, which was a very useful tool back in IE8 days!

https://modernizr.com/

Re:My Current HTML Boilerplate by gerardnll on Tuesday April 27, 2021 @03:40PM (#26960486)
Website is unmaintained, check the Github repo for the lastest version.

https://github.com/Modernizr/Modernizr

Re:My Current HTML Boilerplate by jojohohanon on Tuesday April 27, 2021 @12:26PM (#26958112)
There was a post on Metafilter highlighting a similar approach to graceful javascripting, back when javascript was a question, not an answer.

Basically, serve a page with formatting done via table layout, and then rewrite it with javascript in the client to use more modern layout tools, depending on which features were available on the browser.

Re:My Current HTML Boilerplate by ok123456 on Tuesday April 27, 2021 @11:52AM (#26957610)
What's wrong with using modernizer now?
Re:My Current HTML Boilerplate by frereubu on Tuesday April 27, 2021 @03:05PM (#26960059)
As long as you don't have to deal with IE11, cross-browser support is much better, partially due to fast release cycles. No point including a whole library if all you want to do is detect whether JS is enabled.

Edit: To be clear, Modernizr isn't a big library like jQuery and you can specify the thing you want to detect, so you can cut it down, but it's still pointless if you just want to know if JS is enabled or not.