Reflection report on web app optimization
Websites are fundamentally important part of business since they make a positive or negative impression of their products, services and brand image. As we probably are aware, sites are visited more even though the same products can be purchased on the stores. Therefore, a site should be user friendly, easily accessible, and simple to explore. In addition, it should be improved for different devices like smart phones, laptops, tablets, etc. and site traffic. But during the time spent setting up a website, we're so busy concentrating on the huge stuffs like outline, content, and digital marketing that we forget about the most important part of keeping websites operational and fast. All things considered, speed is a fundamental component of running an effective website and should always be at higher priority.
In general web optimization means
How fast does the page loads on different devices.
How well the server responds to increase in traffic.
Why is web optimization important?
According to the study, about 47% of users wants a page to load within 2 seconds. If the page takes longer time to load, 40% of users will leave the page and 46% users will never return to the same site again. Hence it is a well known fact that faster websites increase visitors and user satisfaction.
Therefore, if the business websites expects the users to continiously visit their site, web application optimization should always be a top priority.
Techniques for web optimization
There are various techniques to optimize the websites. Some of them are described below:
Reduction in HTTP request
The browsers are built in such a way where they are limited to open only some simultaneously connections to a single host. The more HTTP request, the slower website becomes. Also most of the browsers supports HTTP/2 instead of HTTP/1. It is proven that HTTP/2 increases the website performance and latency.
Search Engine Optimization (SEO)
SEO is important to optimize the sites in order to improve their ranking on search engines. Most people visit the site listed in the front or second page of the search engine. No one is visiting the website if it is listed on 20th page of google.
Websites are built using many lines of codes. The code files may have greater file size which directly impacts the page loading speed of website. Such files should be compressed.
Web caching optimization
Cache stores the static data which is accessed frequently in order to serve the browsing request faster. Therefore optimizing cache reduces the server load, latency and bandwidth load.
Code minification removes unwanted spaces, comments and unused variables in order to minimize the size of the code and file.
Replacement of vector graphics
Vector graphics has higher file side and hence it needs to be substituted by resolution independent raster graphics.
Images plays a crucial role in the designing a website. Websites with images are more attractive. But the images with higher resolution may have the higher size therefore it is better to use tools like TinyPNG in order to reduce the image size.
Redirecting a page will kill the performance of the page and also take long time to load the page. Therefore it is best practice to avoid redirect wherever possible.
Cleaning unused tables, optimizing SQL queries and creating indexes are some ways to access the database faster in order to improve the performance of the website.
A case study for application optimization
A case study was conducted on one of the most used Ecommerce website in Nepal i.e. Daraz.com.np
I used a web optimization tool i.e. Gtmatrix to analyze the website speed and performance. According to the study following results were observed.
According to Gtmetrix,
It takes about 6.5 seconds to load the web page.
The total page speed score is 71%
YSlow score is 70%
The total page size is about 3.42 MB
The number of requests is 168
Images are not optimized
To many page redirect
The redirects should be minimized
Specify a cache validator
Browser caching should be used
Serve scaled images
Remove query strings from static resources
Avoid URL redirects
Reduce the number of DOM elements
Make fewer HTTP requests
Implementation of web optimization techniques in my website