1.

How can you reduce the load time of your application?

Answer»

There are multiple WAYS to reduce the loading time of a web page. These are:

  1. Cleaning the code - Your pages will load faster if you optimize how your files load. Since the browser needs to load the HTML, CSS, and JavaScript files, it is a good approach to clean up your code and reduce the file size by eliminating unnecessary spaces, characters, COMMENTS, and other components. More importantly, removing all redundant pieces of code helps reduce the size of files. As a result, web pages will load faster due to cleaner code.
  2. Minimizing redirects - Too many redirects will cause the load time to increase. HTTP request and response times are increased every time a page redirects. Thus, it is a good idea to minimize the number of redirects happening.  
  3. Use images of small size - Images are used on web pages to improve the APPEARANCE of the website. However, these images add on to the loading time of the website. Images with smaller file sizes have less weight, thus, helping in reducing the load time. Thus, compressing and optimizing images is another way to improve the loading process.
  4. Minify and combine CSS and JavaScript - JavaScript and CSS embedded in HTML documents are downloaded each time the HTML document is loaded, which does not utilize the browser caching. Placing JavaScript and CSS in external files makes site maintenance easier, utilizing browser caching and reducing the size of HTML documents.
  5. Asynchronous loading of CSS and JavaScript files - If CSS and JavaScript files are loaded synchronously, each file is loaded one at a time, in the order of appearance in the HTML document. This requires a higher loading time. On the other hand, asynchronous loading can load multiple files simultaneously, which can speed up the website's performance.  
  6. Include JavaScript at the bottom - JavaScript code, either from an external file or within the HTML file, should be placed at the bottom of the HTML body because the script is generally heavier than the HTML content. If JavaScript appears before the HTML body, the browser will load the JavaScript code before loading the document. Whereas, adding JavaScript at the bottom ensures that the browser is not blocked due to the loading of JavaScript and can render the HTML document quicker.  

Some other techniques that can be used to reduce the load time of a website are implementing caching, removing redundant widgets, reducing lookups, USING Asynchronous JavaScript, and creating Accelerated Mobile Pages (AMP), including code from Content Delivery Network (CDN), etc.



Discussion

No Comment Found