With devices, platfroms and technologies all on the change, keeping up can be difficult, but your code shouldn’t need to
Think HTML first
From its conception in the early Nineties, HTML has always been considered and maintained as a standardised language.
The simple and consistent structure of HTML tags means, that even if HTML contains errors, it is easy for an application to compensate and predict the desired structure. This enables the information held within HTML to always be accessible which is, and always has been, the main purpose of the world wide web since it began. HTML is largely the same as it was in the Nineties but the basic concept and use of it has remained.
Page load vs render
A page load is completed when all data or assets required to display the page have been loaded into the browser, whereas the page is only rendered when these assets have been interpreted by the browser and displayed to the user as intended. This means that when looking at site performance you should really be trying to consider both. These two considerations can contradict each other – if you make savings in page load, you are in turn asking more of the browser to piece the data or assets together during the render.
Another thing to consider is the user’s perception of load speeds, for example loading the images at the top of the page normally and then lazily loading other images as they scroll. The truth is there is not one silver bullet approach to gain perfect page loads and renders, but it is vital to strike the correct balance for your project.
Precomplie your code
We have all had to work with a colossal CSS file at some point. This makes ongoing development of a platform very difficult especially when working with CSS, due to its inheritance structure.
The most popular precompilation tools are for CSS, namely Sass, SCSS and Less. These tools provide a wide range of extensions to the standard CSS syntax enabling you to manage your styles in separate files and bring them together into one file. You can also utilise mixins or variables which let you declare sets of CSS properties once and reuse them throughout your code. This makes ongoing development and changes very easy to manage, and on compilation, these files are all brought together into one, ensuring that as few HTTP requests as possible are needed to load a page.
“The browsers that run our code, and the tools and frameworks we use, are ever-evolving and improving, and we need to keep up.”
The browsers that run our code, and the tools and frameworks we use, are ever-evolving and improving, and we need to keep up. This rate of evolution combined with the range of tools available, means that one person cannot hold and keep up with everything. As soon as you realise this, be it within your team or a wider open source community, you will put less pressure on yourself to stay up to date. You will also be sure to benefit from the wealth of knowledge around you, being a jack of all trades isn’t that great when you are a master of none, but being one part of a collective expert group is.