Issue with Custom Metadata for Dynamic Pages Using Cloudflare Worker

Hi everyone,

I’m following the tutorial provided by the WeWeb team to set up custom metadata for dynamic pages using a Cloudflare worker with a custom domain. The setup is working, but only partially.

The issue I’m encountering is that the solution only works when I refresh the page that should trigger the worker. If I navigate to this page from the homepage or any other part of the site, the worker doesn’t activate, and the metadata isn’t fetched or applied. However, when I manually refresh the page, everything functions correctly, and the worker performs as expected.

My impression is that this happens because the Weweb application is a SPA, so when you navigate from one page to another, the browser does not make a new HTTP request to the server. Instead, it handles the navigation on the client side (JavaScript) by managing states and simply changing the displayed content. This means that, unlike a full page load, the URL can change without the server (or the Worker) being notified. However, what intrigues me is that in the tutorial demo, it works even when navigating from the home page.

Has anyone experienced a similar issue or have any suggestions on how to ensure the worker triggers correctly when navigating to the page via internal site links, without needing a refresh?

Thanks in advance for any insights!

I’m facing the exact same issue right now @Slavo if you can share your thoughts?

Hi @tarek and @RianTavaresDev

We are currently awaiting further information or confirmation on this matter, as it’s a fairly complex issue that takes time to troubleshoot. Our goal is to ensure all problems are resolved quickly and efficiently. Many users have reported this issue, and we are keeping track of each case. If needed, we will also update our documentation. Thank you for your patience!

Hello!

does it mean that setting up the dynamic meta data is not working now? I have followed the tutorial exactly but the setup is not working at all on my end so I wonder if its simply bug or anyone got it successful

Hello @Jay12

Yes, you will need to wait a bit until we come up with a solution that works for everybody.

Ok thanks for the confirmation