skip to Main Content

I have a landing webpage in which images are loaded from the database.It is not user-interactive. It is mainly used for SEO purpose.

Currently it’s taking around 5s to load the page. This page is currently created in ERB template for ruby and is working on rails.

We want to increase it’s loading speed.

Will using React JS as front end reduce the loading time of the page? If not, what is the other alternative?

3

Answers


  1. If You need to use the fastest JS Framework, try Vanilla JS. Its definetely faster than both React and Angular

    Login or Signup to reply.
  2. Most likely you do not need react.

    Probably the reason for the slowness is the image sizes. You can either try to optimize the images for web (ex. using WebP: https://developers.google.com/speed/webp/ and https://css-tricks.com/using-webp-images/) or use lazy loading, for example: https://github.com/verlok/lazyload .

    To find out why the page is slow, you can use Chrome or Firefox devtools waterfall or for more indepth, Google Chrome has ‘Audits’ under devtools.

    I’d start out with the devtools waterfall under Network tab.
    Chrome devtools Waterfall under Network tab

    Login or Signup to reply.
  3. I would suggest using an Amazon S3 bucket to store your images and implement AWS’s CDN Cloudfront to cache your content closer to users.

    I would also add that a 5s load time is almost certainly not being caused by your framework and is more likely hardware related.

    You may also want to consider preloading your images.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search