Simplicity is having one place where the DOM is created and managed, and optimizing for the 99% use case.
Complexity is splitting up DOM rendering over two networked systems for servicing a 1% use case.
Browsers are JS runtimes now. Get over it.
Simplicity is having one place where the DOM is created and managed, and optimizing for the 99% use case.
Complexity is splitting up DOM rendering over two networked systems for servicing a 1% use case.
Browsers are JS runtimes now. Get over it.
If your site doesn't work, I don't care, I will go to a different one.
I may be the minority now, and while there is some great use of js out there; most of it is bloated, slow, insecure, and often privacy destroying.
The idea of browsers sending data that the user has explicitly elected to send (in addition to, if we're being pedantic, that the server put there in the first place) is very compelling in this day and age - only problem being that in order for that to have any meaningful impact on web security in the general case, you'd have to more or less universally deprecate JS support, which would set the web in a very different direction indeed.
Same thing that is happening with ads and ad blockers.
All ads are intrusive to some degree.
So what could we do today? That is - if we purposefully limited ourselves to just basic HTML, and server-side processing, without any (or minimal) CSS or javascript, and only using the (expanded) tag and attribute HTML we have today?
I don't know for sure - but I believe we could create some amazing things.
Think about it this way: Look at what demoscene people are able to create when they put extremely artificial challenges in front of themselves; we could try to do the same - and see what happens?
Perhaps there needs to be a demoscene-like competition space for this kind of stuff (how much can you get done in under 100k browser-side? 10k? 1k? Limit bandwidth to the backend, too, and maybe server-side size of code?).
Just some random thoughts - it might be something I'd have to try myself, but maybe this post might inspire someone to do it as well...
Recently I was using an expensive mobile connection and I discovered w3m, a text based browser (runs in the terminal). I was amazed at how much faster everything worked.
Most of the sites were still perfectly usable (w3m has pretty good HTML rendering) but some were very difficult to navigate.
My point is, without JS and CSS, the web is just... text.
And when you browse with w3m you realize, that actually the web has always been text. It can be quite refreshing to get all the decorative crap out of the way.
--
edit: I now see you didn't say to remove JS, but to challenge yourself to see how much you can make in a tiny amount of JS. Such competitions exist!
web pages https://a-k-apart.com/
java games http://www.java4k.com/
There will always be something you can do to reduce power consumption: expecting (or advocating) JS-free versions of all websites for that reason is a completely arbitrary line to draw.
It is not a question about JavaScript or not. It is a question about well developed site.
You will also be in the minority later
Someone with political capital and influence in the developer world will realize that the web is still mostly text and design a browser optimized for that use case. It will be hailed as a revolution and people will start preferring it over the 'old-web' for accessing static content like news.
Then under pressure from developers pushing the limits of static content they will include a simple, limited scripting language that promises to facilitate basic interactive elements and start the cycle anew.
We should call it something trendy, maybe 'The River'?
Sorry, I won't. I don't trust you and I won't simply run your code by default. It's not like I actually need whatever your web site wants to provide; there are plenty of other things to do on the internet.
Sure, dude, ignore anyone without a machine that can run MBs of JS within a reasonable time.
> wouldn't use a browser because I once went to a website that displayed a popup
you would use a popup blocker though.
I have been using the internet nearly daily for about 20 years now. I can't recall a single time I clicked on something that gave me "machine crippling JS malware".
Barring some serious security gaps, JS isn't even capable of doing anything more than lock up the browser and maybe send some extremely minimal information about you back to someone elses server.
Not true. First JavaScript Rowhammer exploit was publicized in 2015: https://www.youtube.com/watch?v=9L5MJ43nbkI
I'd wager 90% can even run the strawman you're building
I'm amazed at how many websites there are on my phone that take 15+ seconds to load... and they've clearly been "optimized" for phones in the sense that the site reacts to being on a mobile browser and lays itself out for a phone... if I wait for the whole thing to load.
(I see this less often, but it's also amusing how many sites pop up their "hey, you've been here for three seconds so clearly we are an integral part of your life from now on even though the main page layout isn't actually done rendering, would you please like us on facebook, subscribe to our newsletter, and tell us your mother's maiden name and SSN? [allow this site to use location services [yes] [no]] [allow this site to push notifications to your home screen [yes] [no]] [allow this site to enter your bedroom at 3am to remind you how much it loves you [yes] [no]]" dialog where both the X to close out and the submit button is unreachable, because the position and zoom is fixed and the whole thing is too large.)
<style>.vote-42:active{ background-image: url(/api/vote/42) } </style> <a class="vote-42">Vote</a>
https://codepen.io/anon/pen/weMwRz
Realistically, I'd probably never use it because it's so dependent on browser behavior, but still a cool alternative.
Subsequently loaded-pages or resources can be significantly faster in webapps however, as they can request (or generate) exactly what they need.
The problem of slow initial loads is being addressed by tools like React by offering server-generated pages on the first load, and then transitioning to JS-based loading for subsequent loads. This offers the best of both worlds.
Obviously you can't make a web app without JS, but I still think you should minimise JS, or remove it if the site truly is static. It's just a better experience.