solid-client-js icon indicating copy to clipboard operation
solid-client-js copied to clipboard

Include GET headers in dataSet object (Especially eTag)

Open gibsonf1 opened this issue 5 years ago • 2 comments

It would be great if the dataset could harvest the headers as an object, maybe dataset.headers. Our particular case is we need to check the eTag in the header to see if a resource has been updated since last load, and then we wouldn't need to do an additional HEAD after loading the dataset to get that header.

The other information we need from the headers is whether or not a redirect occurred, and if so, what the redirected uri is.

gibsonf1 avatar Jan 29 '21 22:01 gibsonf1

Hi @gibsonf1 ,

What you are asking for is a way to check if a resource that is in-memory is up-to-date with the server or needs to be re-fetched (optionally just re-fetch it if it's not up-to-date in the same check call).

Do I understand you correctly?

Cheers, Nick.-

nicolasmondada avatar Feb 01 '21 10:02 nicolasmondada

@nicolasmondada Yes, we have built a system around eTag to know when to refetch a resource thats changed.

gibsonf1 avatar Feb 11 '21 16:02 gibsonf1