background preloader

Webdesign

Facebook Twitter

Javascript - change value of variable on button click. SO Question. Optimize browser rendering - Make the Web Faster. Once resources have been downloaded to the client, the browser still needs to load, interpret, and render HTML, CSS, and JavaScript code. By simply formatting your code and pages in ways that exploit the characteristics of current browsers, you can enhance performance on the client side. Use efficient CSS selectors Overview Avoiding inefficient key selectors that match large numbers of elements can speed up page rendering. Details As the browser parses HTML, it constructs an internal document tree representing all the elements to be displayed.

It then matches elements to styles specified in various stylesheets, according to the standard CSS cascade, inheritance, and ordering rules. According to this system, the fewer rules the engine has to evaluate the better. The following categories of rules are considered to be inefficient: Rules with descendant selectors For example: Rules with the universal selector as the key body * {...}.hide-scrollbars * {...} Rules with a tag selector as the key. Initializr - Start an HTML5 Boilerplate project in 15 seconds!

Skeleton: Beautiful Boilerplate for Responsive, Mobile-Friendly Development.