Hacker News new | ask | show | jobs
by 10165 3312 days ago
"Javascript Required." "Oh snap! Your browser doesn't support Javascript."

I have seen so many of these Javascript-only "websites" posted on HN I am wondering is this coming from some web development template? How difficult is it to have a page with text for those not using Javascript? Something like

  <html class=nojs>
  <p>This website was designed for browsers that run Javascript.  Are you using one?  Here are some examples of browsers that work well with our website: browser1, browser2, etc.  Alternatively, a no-JS version of the website is available <a href=https://blockstack-site-api.herokuapp.com/v1/blog-rss>here</a>.</p>
  </html>
There are of course other ways to do this. The point is that it can be done and is not difficult.

For those not using or with Javascript disabled:

https://github.com/blockstack/blockstack-core

And a blog

   curl -o 1.htm https://blockstack-site-api.herokuapp.com/v1/blog-rss
   tr -cd '\12\40-\176' < 1.htm > 2.htm
   xyz 2.htm
where xyz is some program that displays html or rss.
4 comments

<noscript> is what you're looking for. It has been supported since Firefox v1.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/no...

There are a bunch of very popular web development frameworks where pretty much all the functionality comes from the javascript. Angular and React are some of the better known ones.
I can sorta kinda understand that you would use something like that for a rich web application, but this is literally a blog post. It doesn't get any more static than that.
one of react's differentiating qualities is that it can render the entire page on the back-end, so there's no reason for the page to fail if the user does not run javascript.
Whilst this is often true, not all React code will render server side. You need to take care to make sure your React code stays isomorphic, which usually lasts right up to the point you discover some third party React component you reused would require significant rewriting to support server side rendering. That's how my personal projects usually end up anyway!
It's not difficult at all, but is either overlooked or left out on purpose so you can't read the article without them tracking you. For sites that have active developers and cashflow, it's always the latter.
"The internet is broken. It has been for a while" is the first words of the article you cannot read because of Javascriptosis. Quite ironic.
Haha. Added this commentary to the https://github.com/globalcitizen/taoup fortune database in the section 'randoms on change'.
I'd argue Javascript has largely 'un-broken' the Web. It transformed it from a static, pageload-based medium to something far more dynamic.