DEV Community

Junxiao Shi
Junxiao Shi

Posted on • Updated on • Originally published at yoursunny.com

The Worst Server-Side Rendering Pipeline

This post is originally published on yoursunny.com blog https://yoursunny.com/t/2021/worst-ssr/

My server side rendering pipeline:
I use nginx to invoke PHP to invoke Node.js to invoke Puppeteer to invoke Chromium.
Client side receives a screenshot of the webpage.
They can never steal my super secret HTML and JavaScript code again.

How to have hyperlinks?

If the whole webpage is a screenshot picture, how to have hyperlinks you ask?

<A HREF=browse.php>
  <IMG SRC=page.bmp WIDTH=640 HEIGHT=480 ISMAP>
</A>
Enter fullscreen mode Exit fullscreen mode

The ISMAP attribute creates a server-side image map.
You click anywhere and the server receives coordinates, like this:

GET /browse.php?10,27 HTTP/1.1
Host: ssr.example.com
Enter fullscreen mode Exit fullscreen mode

Want a mobile site?

Sure.

I can use Selenium to control an Android emulator.
The screencast is streamed as MJPEG straight to your device!
Bandwidth consumption isn't a problem.
This is what 5G is for.

I'm concerned with accessibility

We are fully ADA compliant.

There's a 800 phone number on the page in text format.
Blind personnel can call this number to speak to a live operator, who would read the page to them.
This is a friendlier service than Text-To-Speech systems.

User can interact with the page by spoken or keypad commands.
That's web browsing without a computer screen.

Why are you trying to keep the HTML and JavaScript "super secret"?

I'm too ashamed to let others find out that the page is made with Microsoft FrontPage Express and Flash and ASP and jQuery, so it has to be kept secret.


What others are saying

@_cluxter_ on Twitter:
You do realize that it's just a matter of time before someone really consider this as something cool and next gen and implements it?

@ropsue on Twitter:
oh, perfect! And as an additional benefit we can go BACK to pixel perfect cross browser requirements

@dadaistoven on Twitter:
This is sheer genius

@_skris on Twitter:
I was there. I was there when it all began.
*before someone creates this framework/engine for real*

@anirbanroy2002 on Twitter:
Then search engines like Google will have to depend on Optical Character Recognition to index and rank pages!

Peyton McGinnis (@sergix):
This is probably the most over-engineered backend stack I've ever heard of.

Ilya Buligin (@ilyabuligin):
Can you show me this site? It's sound amazing :D

Madza (@madza):
Hahah, made my day πŸ€£πŸ€£πŸ‘

Top comments (1)

Collapse
 
sergix profile image
Peyton McGinnis

Just found this. Great to see a full post about it πŸ˜‚