2 ms·
Perhaps adding support for thin "client-side" shim, so that you'll have just a html of something along the lines of: <html> <head> <title>OJ
by e12e 13y ago
Perhaps adding support for thin "client-side" shim, so that you'll have just a html of something along the lines of:
<html>
<head>
<title>OJ Example: html shim</title>
<!--Include OJ -->
<script src="oj.min.js" type='text/javascript'>
</script>
<!--Include OJ app/page -->
<script src="example.oj" type='text/javascript'>
</script>
</head>
<body>
<noscript>
<h1>Something went wrong</h1>
<p>So sorry. The server was unable to detect that
your client doesn't support javascript. Please try:
<a href="?force-server-side-rendering=true">magick</a>.
(Maybe that should be a client side redirect, via a meta-tag:)
<meta http-equiv="refresh"
content="1; url=?force-server-side-rendering=true">
</p>
</noscript>
</body>
</html>
Now, example.oj will pull in stuff via require etc, and given a "smart"
server, the same page/app can render client side and server side?
[edit: The oj.js script should also probably be able to redirect the client "back" to client side rendering, if it detects js -- so that if google links to url/?server-side-rendring=true -- not all clients from google will be "forced" to do server side rendering.]