GUI - parseFromSnippetAsync XHR request appears to bypass browser cache

When working with the amazing GUI editor alongside its’ older sibling the Playground, I noticed that when I call parseFromSnippetAsync is always returning an HTTP 200 - even when made by a request running in the same Playground!

This PG shows what I’m talking about; clicking the Sphere summons the first dialog, then clicking the “Launch” button dismisses the first and summons the second. Both are distinct instances of the DialogBox class starting ln106. The code behaves as expected, except for the repeated call out to the snippet server (you’ll need to look at the dev tools network tab to see the actual requests)

Perhaps (and this would likely apply to NME, PG, any snippet server URL) configuring the server to include a response header specifying an unlimited cache lifetime for a particular snippet ID would improve people’s performance and save the project a bit on hosting?

makes sense, let s see if @RaananW have a reason behind the uncached approach ?

Yo!

I think I might have missed something, but I don’t see repeated calls to the snippet server. in fact, I don’t see any at all… I clicked the sphere, then clicked launch, and got nothing in the network tab. Am I doing something wrong?

Do you have XHR requests displayed? If the dialog is loading at all, then it has to be making at least an initial request to the snippet server, right?

1 Like

Oh, I see :slight_smile:

So I see two requests. And you are saying - it makes no sense to run those two, it can be cached. And I totally agree with you.

Let’s see what we can do server-side.

1 Like