Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
kiki352491yJust use nunjucks or mustache or twig or pug or whatever template engine
Frontend js was never meant to be executed on a server
Hello can I please get isomorphic react-native-web hooks with graphql n+1 in nextjs on an edge backend-for-frontend server with build-time css-in-js please
They have played us for absolute fools -
All this server-rendered agit and yet there's still no standard for
- link prefetching
- preloaders
- partial document updates (even though one of the main features of XML is queriability)
- page transitions other than the massively popular "flashbang" effect -
None of these require a Turing-complete document description language, it's the W3C that decided to define them in terms of JS.
-
But there's actually a very simple explanation as to why most advanced features get defined as JS objects and functions:
The two possible roles of a browser that make sense are an application runtime and a document viewer. Anything that can describe itself as an application will have a ton of custom functionality that it shares with relatively few other applications. The only sensible way to support these is to define a programming language which can construct any logic and control the environment through the runtime. -
Service workers are an awesome idea, they reduce the problem of caching to simple concepts and "behaviour". Their only flaw is that their introduction would have been the perfect time to deprecate all HTTP cache control headers and slate a ton of now redundant browser code for deletion.
-
@lorentz we still need http cache for websites which are not applications but regular documents.
-
@Lensflare Fair point, there ought to be a way to avoid having to define and implement the interplay of service workers and http cache though
-
max199313681y@Lensflare which would mean that every application which are also just documents, HTML Code specifically, sprinkled with js Code to add functionality to it.
No cache control will make all thise CDNs useless.
SSR in frontend frameworks
joke/meme