hello wix forum! I want to know if is possible to preload a dynamic page? if I’m reading page one I would like to be loading the second dynamic page so when I finish reading page one the second one will be displayed faster because it would be pre loaded. my dynamic pages are too slow I want to speed it up if possible. at the moment it takes 5-6 seconds to load a page with a gallery and control buttons.
thanks for your attention!
Fausto
Are you using dataset binding to load your dynamic page? If so I think the only way to do what you want is with more code and to use wix-data and replace the loading of the dataset directly from the database.
It is possible that you could create two datasets using the same datacollection (I haven’t tried this FYI) and have two sets of elements (forms?) one that you bind to one dataset and one that you bind to the other. Then you would need to hide one form and populate it from the secondary dataset with its index set to the even number indices. Then when your user clicks on the ‘next’ button’ you could hide the visible form and show the invisible form and then update the newly invisible form with the next item of data. So essentially one dataset filtered on odd indices of data and one dataset filtered on even and advanced alternately for each user click.
If that doesn’t work (or is too slow also - which it might be depending on the page size you use and how dataset loading is done in the background by wix) you’ll need a similar approach using wix-data where you would cache some number of records and update several sets of elemenst…
Make sense?
hi stcroppe!
yes, your idea makes sense. I understand the process and will give it a try. by the way do you know if connecting the datasets or making the dynamic pages with code is faster that using the menu?
thanks for the help
I would imagine that Wix have done their best to optimize the menu based connections since the focus is to simplify web site development. Having said that even the binding tools require you to think about how you cache data in a dataset by setting page size etc. One thing I think (and the Wix team will likely correct me if I am wrong) you will get from code is more control on when to get data and how much and by optimizing this you reduce the asynchronicity of your page as it connects back to the server. Remember a Wix web site is generally one page and when ever you access data you go back to the server to fetch it and that is time consuming.
Hope that helps?
Hi,
Dynamic pages performance is an ongoing process that is on our table, hopefully we can get to a state where you wouldn’t need to think about anything in the common scenarios.
For navigating between dynamic pages, there’s currently no difference I can think of if you use the binding or code it manually, although I presume it will change in the future as we implement more optimizations.
Note that you can create a difference by implementing cross-page caching using code, I believe you can try to do that with saving the next page data to local storage.
hi stcroppe, I understand what you say and I think you are rigth, code gives you more control. thanks for your help.
hi Tomer, I will do research about the croos-page caching and see if I can make it because I’m learning wix code. thanks for your help.