Press "Enter" to skip to content

Fastest web application ?

Fast means fast. Web application nowadays can offer much more in very less effort. But we also need fast delivery of the responses for the incoming request. So, here is the list I maintain for my application to be faster.

Never use resources inside a loop

Resources are not supposed to be used inside loops. Resources means mechanism that has capability to communicate with other application. For example, database connection. It is highly recommended  that never perform any SQL queries inside a loop.

Same goes for sockets, file operations etc.

Use cache

If you result is always the same, it’s better to use cache or hard code those stuff. Often in laravel, I keep these in a environment of config files. No need to call upon database or any other APIs.

Proper response headers

Don’t accept the improper data. Use accept header in every request. Tell the server what kind of data is acceptable. It leads to filtering of data that can be passed. This way your server does not have to serve requests that they cannot.

Also,  respond with status code rather than text. This is much faster because there is less data to transfer.

Compress your data

Always compress textual data using gzip.  It means less data to transfer for servers. But don’t over do it. Do not compress data less than 10KB. Learn how to compress data here.

Negotiate the content

Content negotiation is something that happens in API programming. You ask the server what data is required and what data is not required. For example, you can ask for email only in scope, so that server will only send email addresses discarding rest.

Optimize and minify

  1. Don’t make unnecessary requests. Combine your asset files into one single file.
  2. Remove unnecessary plugins.
  3. Minify all the files of javascript, css and possibly html too.
  4. Optimize the images. The quality of images of 10MB can be reduced to 700KB without loosing much quality for the web.
  5. Try to retrieve the data separately if not needed immediately like using pagination or lazy loading.

Terminate the application

Application takes up memory space, so try to terminate the application as soon as it is possible.

Use better technologies

  1. Try to use dedicated servers rather than shared hosting. They are cheap nowadays. Sign Up here for digital ocean. You will get $10 for free.
  2. Don’t use file based drivers. Consider using the available alternatives like redis or memcached.
  3. Use Algolia, solr or lucene for search systems. Your database will have less requests to deal with.
  4. Refer 3rd party scripts to cdn ( content delivery network ). Their servers are generally faster and handle more requests with efficient cache system.

Check out these websites. They open very fast in the browser.

  1. Housing
  2. Housing anywhere
  3. Laravel
  4. Secure
  5. Varvy

Everything is awesome.

9 Comments

  1. Sling TV
    Sling TV November 12, 2018

    Hello! Do you know if they make any plugins to
    protect against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any recommendations?

  2. Thank you for the good writeup. It in fact was a amusement account
    it. Look advanced to more added agreeable from you! By
    the way, how can we communicate?

  3. Sling TV
    Sling TV November 15, 2018

    This is a good tip especially to those fresh to the blogosphere.

    Brief but very accurate info… Appreciate your sharing this one.
    A must read article!

  4. Sling TV
    Sling TV November 15, 2018

    Good post. I am going through some of these issues as well..

  5. Sling tv coupons and promo codes for november 2018
    you’re in reality a good webmaster. The website loading velocity is incredible.
    It kind of feels that you’re doing any distinctive trick.
    In addition, The contents are masterwork. you’ve done a magnificent process in this matter!
    Sling tv coupons and promo codes for november 2018

  6. These are truly impressive ideas in on the topic of blogging.

    You have touched some fastidious things here. Any
    way keep up wrinting.

  7. Sling tv coupons and promo codes for november 2018
    Wow! This blog looks just like my old one! It’s on a entirely different topic but it has pretty much the
    same layout and design. Wonderful choice of colors! Sling tv coupons and promo codes for
    november 2018

Leave a Reply

Your email address will not be published.