Hacker News new | ask | show | jobs
by pstch 2402 days ago
This site cannot be viewed without third-party JavaScript enabled (it shows a blank page on both Firefox and Chrome), and this is happening more and more on HN links. I think it's pretty sad that so many websites are adding a client-side dependency on third-party code just to view the website. In this case, this doesn't seem intentional, as the code is full of <noscript> tags.

I also cannot begin to understand how can a <body> tag's class definition can take 4400 bytes. In what kind of situation do we need to apply 146 CSS classes to the <body> tag ?

3 comments

It's a squarespace site, and this particular behavior is pretty universal to squarespace sites, near as I can tell.

Since it's due to the squarespace, I wouldn't really characterize this as "third-party" javascript per se, but I agree it's annoying the page needs javascript to even render. Boo on squarespace.

If you don't want to enable all third-party scripts, try uMatrix (https://chrome.google.com/webstore/detail/umatrix/ogfcmafjal...). It has very fine-grained control over what assets you allow from where (it's why I knew offhand this was squarespace). A warning though: it's got a bit of a learning curve, and depending on how restrictive you want things, you will probably end up spending a fair amount of time un-breaking the internet.

Needing third-party scripts isn't necessarily evil in my mind though--aside from squarespace-like cases where a page loads scripts from the underlying platform (squarespace, or custom domains on top of medium), the other common case I see is loading scripts straight from cdnjs or similar. Is it really evil or insecure to load jquery from cdnjs?

Strange, it works for me on an ancient version of Safari (9.1.3) that's kitted out with ghostery and JS blocker. Most modern sites don't work on it, but this one did.
That's probably because that version of Safari ignores this little bugger:

    .site.page-loading { opacity: 0 }
I used the developer tools in Firefox to disable that one and the page was instantly viewable without JavaScript.

That's right, the site uses CSS to hide all the content and then presumably reenables it somewhere in the gobs of JS, maybe after its loaded whatever other analytics/tracking crap there is. Absolutely vile.

It makes me sad that this is (currently) the 2nd-top-voted toplevel comment on this post.

Can we stop whining about how people choose to present their work and instead discuss the (in this case, really cool) work instead?

People are rightly complaining about the accessibility (or lack thereof) of the content --- it needs to be nothing more than a static page, and in fact would be perfectly readable as such, if it weren't for one line of CSS that hid the content unless JS was run.
By "third-party", I presume you mean anything originating from other than the site's domain?

I haven't actually checked the site in question (on mobile, kinda tricky), but isn't this OK as long as a subresource integrity hash is used?

My main gripe is that JS is required to view the website. It doesn't work on my mobile phone (which is rather old, I admit), and it takes a huge amount of CPU time to load on my X60.

I really like that I can still use HN on this phone, but it's more and more frequent that I cannot open the links themselves.