Hello Wix team
I was very enthusiastic about the new prefetchPageResources API.
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 ?
thx for your answers @Yisrael (Wix)
I too was very excited when prefetchPageResources API came out. However once implemented there was no noticeable change to speed on the website I was working on. Still takes 3-4 seconds for the lightbox to populate.
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?
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.
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 @Quentin Plomteux,
1. 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. 2. No, because it prepares the NEXT lightbox/page, landing page is the first one to load.
3. Yes
4. 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.
5. 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.
Could we have some kind of answer from Wix team ? :)
Yes. I couldn't feel a significant change either.
but the console.log worked for me (after I moved the prefetch to inside an $w.onReady() function, which as I said was missing from the documentation).
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 .......
Help, Wix?
I also tried prefetch for Lightbox and there really wasn’t a noticeable difference at all. Help.