Closed workindo-coder closed 4 years ago
The googlebot likely does not do any scrolling, so it likely won't cause any intersection observer events to happen.
Closing this, as there is not a lot we can do about it.
You could detect that the user agent is googlebot and have a flag like forceRender
?
public ngOnInit () {
if (this.forceRender || (isPlatformServer(this.platformId) && this.preRender === true) || (isPlatformBrowser(this.platformId) && this.fallbackEnabled === false && !this.hasCompatibleBrowser())) {
this.load();
}
}
Yeah that could work. Then you can control from the outside if you want to always fire the deferLoad event in certain scenarios (e.g. userAgent is google bot) Happy to re-open this, if you want to provide a PR for it @workindo-coder
I implemented the package exactly as described in this example: https://www.npmjs.com/package/@trademe/ng-defer-load
It works fine when I scroll over my website but it looks like the google bot does not see the images. Is this a known issue? Or am I doing something wrong?