3 ms·
A good example is probably progressive enhancement with javascript. You create a page that is just HTML, CSS, and images and send that to the user, at the end
by Periodic 16y ago
A good example is probably progressive enhancement with javascript. You create a page that is just HTML, CSS, and images and send that to the user, at the end you specify the scripts that load and add all the functionality and enhance the page. For most users they won't even notice that the javascript isn't loaded for 0.5 seconds. If they do click in that small window of non-operability, they get a little confused and click again, by which time it works. Most people won't even notice though.
This can be used to add fancy animations, add an actual embedded video over an image of an empty video player, add comments to the end of a blog post via AJAX. Most people won't even realize you're giving them static content initially.
- alttab 16y agoThis is such a good point. As little javascript should be run client-side on initial page load. What little does shouldn't be vital to the layout or presentation. Not taking this into account causes unusual UI lag, frequent dropped initial clicks, fast responses from the server but slow page load times, or visual "chunking."