question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v-lazy fires twice

See original GitHub issue

I am using the v-lazy on the <img> element.

Lazy load works fine, however, the issue is the request fires twice?

import VueLazyload from 'vue-lazyload'; Vue.use(VueLazyload, { attempt: 1, preLoad: 1 }); <img v-lazy="'{{asset('/images/svg/personalise.svg')}}'" class="lazy" alt="Personalise Icon">

I am using this inside the Blade file in the Laravel project.

Screenshot 2019-08-02 at 13 23 42

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:11
  • Comments:12

github_iconTop GitHub Comments

19reactions
raisezhangcommented, Oct 10, 2019

I found that if the disabled cache was turned on, there would be two requests. Disabled this option won’t have this problem.

Turn on Disable cache

image

Turn off Disable cache

image

5reactions
Merottcommented, Jul 9, 2020

While this is unlikely to be a problem in production because of browser’s caching behaviour, it still should be fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

If you are lazy, but inside you have a fire to work twice as hard ...
If you are lazy, but inside you have a fire to work twice as hard as possible, but at the end of the...
Read more >
Angular Service called twice in lazy loaded modules
I am creating an Angular application where I have implemented lazy loading. It is working fine but when ever I am making any...
Read more >
Lazy datascroller calling load twice - Prime Community Forum
I'm trying to use a Datascroller with a LazyDataModel and the load method from lazy data model is getting called twice.
Read more >
OnTriggerEnter is called twice sometimes - Unity Forum
Sometimes my OnTriggerEnter() is called twice. I have a variable that increment points each time when laser object collides.
Read more >
The lazy project manager, 2nd edition: How To Be Twice As ...
Amazon.com: The lazy project manager, 2nd edition: How To Be Twice As Productive And Still Leave The Office Early: 9781908984555: Taylor, Peter: Books....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found