by snickerer · 1w ago · 0 comments
In both worlds, the problem is who a site owner decides to grant access to your shopping session, not the fact that access can be granted at all. Or how would you ban them from e.g. insecurely transmitting your card data to their payment service processor on their backend? You just wouldn't see it.
> deliver just data and my browser decides what to do with it
Code is data and your browser decides to execute it. A toy example, but HTML+CSS is Turing complete. The problem thus isn't that it's "code", but rather that it's not properly sandboxed.
> my shop browser decides how to operate with the catalogue in a way I want
Are you making a case for built-in components for e.g. sorting and filtering and what have you? To me that's just way more clunky than having an actual programming language. Even PDF, a static document format with no real user interaction, has a programming language (PostScript) embedded.
So in my view, the problem with JS isn't the features of the language itself, rather that the standard library has too much power, to make requests and access your microphone and stuff like that.
But even then, people want to use their computer to do video calls, and whatnot. And I for one much prefer using Zoom or Teams or such in the web app, instead of downloading the app version. Precisely because the web app is more tightly sandboxed.
PDFs are (usually) static pages in a fixed paper format, so they should only display stuff, not do calculations. Same for most web content anyone ever wants to visit (excluding games, demos, actual apps, etc).
If you want a real-world example, a food processor is clearly way more dangerous than a TI84. The danger lies in the sharp knives, not in the computing power. That's how I feel when people blame JS's status as a programming language, for things that are rather due to its access to network requests, etc.
> PDFs are (usually) static pages in a fixed paper format, so they should only display stuff, not do calculations.
My point is that even for just displaying stuff, it's convenient to have some degree of computation. Look up Kolmogorov complexity. If you've ever used LaTeX, you know how useful it is to have macro expansion in your document format.
Or consider a CAD program. That's "just" used to design 3D models, circuits, etc., all completely static. Would you agree that it's more useful to support computation such as "place this line 5cm from that" or "repeat this shape 3 times", than to just have your file format be a static list of coordinates?
Does that illustrate to you why computation is useful? I'm not saying Turing completeness is required, but it's hard to avoid once you support a quite small level of computational expressivity, and there's no real reason to trying to limit it.
(Unless you want to prove things about your program, but that's another discussion.)
I'd take more clunky over what we have any day of the week.
>Even PDF, a static document format with no real user interaction, has a programming language (PostScript) embedded.
Given the millions of PDF exploits, that's likely the worst example one could give in support of this.
Like yes designing a generalized shopping experience is possible. It is also going to limit the long tail of features OR become such a huge and bloated spec that it will make things way worse. Imagine Temu but for all the shops.
Besides, doesn’t your browser and OS come from some third party? How much do you trust them to be bug and backdoor free? Or do you have your own browser and OS that you know for sure can do all this and you have verified?
They weren't saying websites should be completely static, just maybe they shouldn't run attacker-controlled code.
Yes, you could do that. Works fine. How often should it need to be?
Or it could resend a diff of the page. We have remotely rendered AAA game platforms, where you just get some video back at 60fps, we can surely send commerce changes too even at 1/1000 the bandwidth.
Or you could have something like Ajax/XHR/messaging, or pub/sub push of plain data, no need to "the browser can be send any arbitrary code to execute".
You'd still have to trust the hardware, OS, browser, and now an LLM too, but that threat model could be preferable to running arbitrary (especially 3rd party) Javascript.
Is this supposed to be a generally applicable example, or that we should base the design of web commerce moving trillions of dollars to the needs of such niche areas?
Let's do "limit the long tail of features" for 80% of things that don't need it, so that my grandma can buy sweaters without needed a degree in cybersecurity.
We can have a special laxer renderer for that that comes up with red blinking alerts when you visit those pages.
Nothing about an example like custom engraving requires the current everything-available web model anyway. As an example we have remotely rendered 3d gaming GeForce NOW, xCloud, etc. We surely can support something like placing an engraving text on a product.
>How to avoid discounts based on item combinations that are store-specific? Is your browser smart enough to do complex searches and filters for things like photo gear where some values have ranges?
You know we can have server side logic since the 90s, right?