Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Could we make Javascript optional as well while we're at it?

"This site tries to run Javascript. Normal news sites shouldn't need this.

[Allow this session] [Allow 5 seconds] [Deny]"

I'd be particularily interested in the second option since it would allow us to use sites that depend on JS for content while they roll back the craziness that is depending on scripting to show static content.

While I'm at it:

I want badges!

- Certified Javascript free page (Platinum)

- Certified progressive site, no dependence on Javascript, no long running background scripts (Gold)

- etc

Obviously I'm exaggerating the implementations here but I'm serious about the idea.

(And yes, I earn good money on frontend work, I just think it often makes solutions worse.)



Ha ha, "certification" is a cool idea, but it would be hard to get anyone to care about it. "Allow 5 seconds" is a feature I really want now - I might dig into the Firefox code (or No-Script) and see if I can figure it out!

I have no-script on by default, and these days I need be convinced there's a REALLY good reason to temporarily whitelist a site.

Sure, a lot of the web is now either a blank page (or "you need to enable js to run this app") but on the positive side, I'm a lot more productive as I just close those sites and move on!


I've wanted the "allow 5 seconds" thing for a long time too.

You can manually pause and resume js by opening up the debugger and hitting pause. The code exists it just needs to be exposed to the UI.


How would this interact with onclick handlers on buttons and the like?

Would it be that after 5s the user couldn't interact with elements on the page like that (e.g. if they open an image, and wait a few seconds, they then couldn't close it because the 'x' onclick handler wouldn't run), or would each handler run by a user action (like an onclick) have 5 seconds to run?


Either, you could even have both as options.

The simplest way to do it would just be to pause js 5 (or maybe 15) seconds after page load, and have a button beside the url to resume/repause js.

The devtools keep working with js paused though, so it should be possible to do something like have a onclick handler that resumes and starts a timer to repause the js.

Ideally I think I'd like click's to resume js for a few seconds unless they are clicking on a link (with a href that leads to another page). I'm not certain that would be technically easy but it seems likely it would be.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: