I have read that multiple http request for web resources(html, css, js) results in lazy loading of web page. What if we create whole html and css on client side using js. If i have index.html that contains following code:
<html>
<head></head>
<body>
<script src='main.js'></script>
</body>
</html>
and main.js contains something like:
var d = document.createDocumentFragment();
d.appendChild(para);
var para = document.createElement("P");
para.innerText = "This is a paragraph";
document.body.appendChild(d);
will it make page loading faster?