This has come up a couple of times, but the 1 working solution I found is hardly satisfactory: on Page A a wixLocation.to(‘pageB’) and on that page B another wixLocation.to(“pageA”). Takes up a lot of time.
My problem is a slow internet connection: sometimes wix times out because it cannot load all bolt parts, a dataset, whatever. Usually a warm reload fixes it because all these parts are cached.
I would like to put a link a the page which, after a caught timeout, says something like “Reload page”.
Using wixLocation.to with the same page name or with some params (?foo=bar), does not work, it does not reload the same page.
Anyone have a better idea?
Howdy - forgive me for not directly answering your question but I find https://gtmetrix.com/ a blessing as it breaks down where sites are slow, from time to first packet through to images, etc. I do a lot of work with edge caching and that is the likes of a CDN where the data is brought closer to the user. At times with slow internet connections there may be a way of delivering quicker such as smaller imagery, partial loading, etc. All the best and good luck!
With my general knowledge, to refresh the page just run this funtion
function refresh() {
let currentLocation = wixLocation.url
wixLocation.to(currentLocation)
}
or if your datasets didn’t load well you can refresh all datasets on that same page then run their onReady functions again
DJ bon26
Thanks, but as I said in my question, that retrieves the cached page, it does not reload it, even if you add some dummy params.
we are checking if we can add such an API to reload the page
thanks yoav, that would help a lot.