Unfortunately, it does not have an impact on the loading time of my lightBox. See this website for instance. On mobile scroll to the map, click on a location on the map. Lightbox takes more than 2 seconds to open and nothing changed with prefetch.
How are we supposed to use that method? within page code, within site code?
Can it work on the landing page?
Does it work on mobile?
What should be the expected effect (in time decrease) of using prefetch?
What are the drawbacks of using prefetch ? I mean, why not prefetch all the pages and all the lightboxes ?
Yup …me too. I recorded a video to check site difference before and after code … no clue if it even worked (because there was visible difference and) because the console log message didnt even work …so …
Lightboxes by default should load instantly. I don’t understand what is going on here, many people have been airing these concerns since lightboxes were released. Would love some comments from Wix about this
Both will work, use it within the page that has the link to the lightbox, so when the visitor clicks on that link, the lightbox will load a bit faster.
No, because it prepares the NEXT lightbox/page, landing page is the first one to load.
Yes
It depends on the page/lightbox you are going to prefetch, and on our internal optimisations. At the moment on fast networks it is around 100ms faster, and on slow networks it’s 3s-10s faster.
Prefetch happens when the browser is idle, so doing it to all pages means the first ones will probably be prefetched and the last ones won’t. Other than that there is no restriction.
@contact53319
We are working on making lightboxes load faster, but it’s not an easy task, that’s why we released the first optimisation (prefetchPageResources API), and will continue until lightboxes are fast enough.
And if there is no link to the lightbox on the page, e.g. when you use lightboxes from code to display success or error messages? Can they be prefetched too?
@giri-zano
Sure!
Prefetch them before the visitor is starting the flow that ends with that success message, and preferably after you know they are going to start that flow
Unfortunately, after extensive testing and giving it time to settle as a new feature, I don’t see any impact at all with this optimisation technique for both Pages and Lightboxes.
I have added it and tested it in a number of sites - which i have now removed it form. Makes no difference.
Hi @Stephen, @Robert,
The impact is mostly on slow networks, so I would suggest checking it on 3G.
4G visitors won’t feel much difference, but for the 3G visitors it can save a few seconds when loading the page.
Now you should decide:
On one hand, I guess importing wixSite from the wix-site module takes some milliseconds and on the other hand pre-fetching saves some milliseconds and both are unnoticeable in most cases. What would you do? Save a few ms of the 1st page loading time by not importing wixSite or save the a few ms of the 2nd page by pre-fetching.
I We are not talking about milliseconds … we talking about 1 / 2 seconds. From click to appearance on a fast wifi network. I don’t see any difference between with to without prefetch.
Has anything come of improving the UX for lightboxes. A lightbox is a great solution for many kinds of menuing, popouts or custom input but they appear to be dead slow? Is there a cure?