5 hacks to improve Front-End experience

5 hacks to improve Front-End experience

Consultadd Technology 1 Comment

In today’s world, developers and clients have a constant urge to innovate and possess the best technology for their products and services. Be it python frameworks like Django, Flask; java frameworks like spring, struts; or technologies like Kronos, Big Data and Jira. All these smart technologies come with even smarter problems which need to be solved. We, at Consultadd, therefore make sure, that all your problems get solved by our smart IT solutions! This blog is written to give you a picture of what it actually means!

A digital media client of ours, once approached us to resolve an issue they were facing on the front end side of their website and wanted to solve it as soon as possible. We knew that in this competitive age of marketing, a slow website is nothing less than an unforgivable sin! So we grabbed a cup of coffee, rolled up our sleeves, and started on this mission to boost the Front-End Performance of their website.

So basically,

Be Quick
100%
Be Secure
100%
Have Version control
100%
Occupy lesser memory space
100%
Have a definite style
100%

The problem of Render Blocking in JS

Most of the times, the JavaScript in the <head> of the code blocks rendering. This is indeed a problem and could contribute towards a bad user experience. This problem, however, was solved by placing the script at the tail of the website. As a result, the script got downloaded only after the complete HTML was downloaded, therefore, preventing render blocking.

Why custom web fonts?

For a unique visual experience, we used a custom text font for the site. However, when certain browsers encounter the font in the site and find out that the font isn’t available in the user’s computer, it completely makes everything in that font disappear, which is disastrous (from a reader’s point of view). Therefore we used a substitution approach in which we tell the browser to display the text content in a rather common font until the custom font gets downloaded. Once the custom font is downloaded, the browser will replace the common font with the custom font and re-render the text.This helped us to provide the client with a site which had a distinct style without compromising on the user experience.

Animations in/ Images out

To make our site uniform and follow a consistent style, we used Scalable Vector Graphics (SVG). SVG is an XML based vector image format, which means that it does not change its quality on resizing and rescaling. Moreover, the basic purpose to use SVG (apart from the fact that it has vector graphics) is that it can easily be styled and animated with CSS.

Must know image format

Images take about 64% of the total memory space in a website. Therefore, it becomes necessary to find out an image format which has smaller file size than most of the existing formats but at the same time does not compromise on quality. To tackle this, we used an image format called WebP which is 25% smaller than their JPEG counterparts.

Creating our own static site generator

Dynamic websites take a bit more time to load. This is because every time a user puts in a command, the request goes in to the database (backend) and the result is fetched and then served to the user (frontend).Therefore, we created our own static site using Node.js in which the content is already stored in less-space-occupying flat files which are already prepared for the user even before he/she puts in a command. This helped the website to have a greater response to the user’s queries. Moreover, as there aren’t any additional plugins for static sites (unlike WordPress), these are comparatively safer and are the least vulnerable to bugs in the code (either intentional or unintentional) which therefore, makes it secure. Also, static sites havethe ability to have version control, which is in fact a great feature when it comes to the development aspect. However, for a particular interactive section of the site, we used dynamic site as it had a better engaging capabilities.

Hence, all of the above problems were tackled keeping one motive in mind, i.e., to boost the frontend performance of the website and to make it quick, secure, visually pleasing and efficient on the memory aspect. And guess what! The project was completed before time. Although there were some obvious challenges in situations where we got stuck at a dead-end, but we brainstormed and eventually got the solutions which were unique, innovative and impressive. Back here at Consultadd, we plan, execute, test and deliver at appropriate time with technologies to benefit a client with better solutions. And that’s how we manage to have smart IT solutions for smarter business.

About the Author

Consultadd

Share this Post