0

I am developing an ecommerce website https://www.babyshopnepal.com I am trying to load the contents of the site as the user scrolls through the page. I want to achieve functionality similar to shopclues.com i.e load contents when user scroll.

I tried to use jquery lazy load but it didn't effect any page load speed.

Any ideas how to get this functionality with laravel?

Prajwol Onta
  • 1,448
  • 5
  • 21
  • 48
  • 1
    I think you can get solutions in this discussion: http://stackoverflow.com/questions/5020351/how-to-load-the-web-page-content-based-on-user-scrolling –  Feb 03 '17 at 08:03

2 Answers2

0

The answer to this question is most likely pretty Laravel-independent.

You need to use Javascript in order to load the content (typically images) dynamically. These images can usually be retrieved without Laravel's involvement (since they can be simply accessed using http://your-site.com/your-image.jpg), so that's why no Laravel-specific solution is required.

You mention the jQuery Lazy Load plugin yourself: Were you able to make it work, or did it fail?

Note, by the way, that delaying the download of the images will not make Laravel generate the site faster. It will not necessarily increase the reply time. It will, however, allow users to delay the download of some potentially large image files.

DerJacques
  • 322
  • 2
  • 12
  • yes.. lazy load works but it doesn't have any effect on perfomance.. did you check shopclues.com ? See how they have loaded the content only after user scrolls? – Prajwol Onta Jan 27 '17 at 04:40
  • Yes, I saw that. But how does it work for you? I'd say that if the content doesn't load after the user scrolls, lazy load isn't working as expected. :) Also, what is your measurement for performance in this particular case? – DerJacques Jan 27 '17 at 14:40
-1

Try compression on server -> Check GZIP compression -> https://checkgzipcompression.com/

  • gzip compression already done via .htacess.. i'm more interested in loading content with the flow on scroll by the user.. just like shopclues.com – Prajwol Onta Jan 26 '17 at 14:44