3 ms·
> Modern websites in particular often have large JavaScript bundles - the front page of CertSimple is 242 K gzipped, and would be 1.1MB uncompressed! What puzz
by dvfjsdhgfv 8y ago
> Modern websites in particular often have large JavaScript bundles - the front page of CertSimple is 242 K gzipped, and would be 1.1MB uncompressed!
What puzzles me though... How much of this 1.1MB is really needed? You can do form validation with HTML5. I don't see any other candidate on their front page. So instead of getting a 14% advantage, what about pushing it to 100% or so?
- Klathmon 8y agoSo you looked at their front page and concluded that they should be able to get rid of all javascript? CertSimple is a full dashboard and application that does a lot of crypto in the browser which requires quite a lot of code. Sure, there are probably gains to be had with code splitting and lazy loading, but those get significantly more complex and can cause issues for codebases that aren't setup to take advantage of it from the start. And improvements are improvements. This was a blog post showing you how and why to implement brotli, not a request for how to improve page loading speed for their application specifically.
- dvfjsdhgfv 8y agoI looked at the front page because they specifically mentioned it in the article: > the front page of CertSimple is 242 K gzipped, and would be 1.1MB uncompressed! Of course the full app is a completely different thing.
- nailer 8y ago> Of course the full app is a completely different thing. Author here: no. The app is the front page. /blog is a seperate AMP based site and tiny. Search 'discify' in this thread for a breakdown of what's in the module.
- chrismorgan 8y agoHTML5’s built-in validation is actually not all it’s cracked up to be just yet, because the currently defined and supported CSS selectors don’t cover all cases needed: you don’t want all your fields to be styled invalid on page load, only once the user has interacted with them or tried to submit. Firefox has :-moz-ui-invalid, I don’t think others have anything, and :user-invalid is the direction Selectors Level 4 is going, see https://drafts.csswg.org/selectors-4/#user-pseudos https://drafts.csswg.org/selectors-4/#user-pseudos. If you want a pleasant experience, you can’t use HTML form validation by itself. You need some added JavaScript. (I am not defending over a megabyte of JavaScript. I like to do such things from scratch and optimise for size, and all the functionality that I see on that page looks like it’d comfortably fit in under ten kilobytes of JavaScript. The CSS can probably also be decimated. But these things only happen that way if you value such performance, and few do—perhaps justifiably, perhaps not.)