//Question about caching

Dear lovely people,

I cache my website but when my network signal gets poor (1/4 bars) my website starts slowing down a lot, and this bothers me.

This doesn’t really make sense because those files needed are placed in a dataset that fetches the content on page load.

My question:

Can you write a piece of code that checks if a URL or file is locally stored first and if not redirect it to the internet of facts?

This would lower calls to your servers and improve performance after that first load, at least in my use case.

//Homes Simpson: Doh!

I use a wixData.query() to fetch an image every time for my character together folding piece of code and this is the problem.

So, I solved it by creating a URL library Array in onReady() one time using a wixData.query() and fetch the URLs from this after I created it.

Now it does not need a constant connection to the internet of facts to fetch the images and it runs must faster even when having a low network signal and yes, it is async, so this was not it.

Anyways, this fixed it.