3 ms·
If you are able to "pre-render" a JavaScript app like this, then you should be serving users the pre-rendered version and then enhancing it with JavaScript afte
by wldlyinaccurate 13y ago
If you are able to "pre-render" a JavaScript app like this, then you should be serving users the pre-rendered version and then enhancing it with JavaScript after onload.
JavaScript-only apps are a blight on the web. All it takes is a bad SSL cert, or your CDN going down, and your pages become useless to the end-user.
- dchest 13y agoAll it takes is a bad SSL cert, or your CDN going down, and your pages become useless to the end-user. How are non-JavaScript pages protected from this?
- Isofarro 13y agoLess dependencies, a reduced risk vector. Just the HTML page containing the content needs to load.
- wldlyinaccurate 13y agoApologies for being vague. Regarding the SSL certificate, I was referring to modern browsers refusing to load "unsafe" assets. When the JS can't load, JS-heavy apps tend to either be raw templates (i.e. full of {{ statements }}) or completely blank (if the templates were going to be loaded in a separate request). As Isofarro said, non-JS pages don't suffer from this because the content is there in plain HTML.