Split problem with manifest.webmanifest file

We have a problem with manifest.webmanifest file, Netlify is assigning a cookie nf_ab different from the main page that loads it, so it tries to load manifest.webmanifest of the different branch where this file does not exist.
Does somebody know what can happen?

Thanks a lot :slight_smile:

Hi, @javiernuber, and welcome to our Netlify community site.

Would you please send us the URL which references the manifest.webmanifest file?

You can also send this to us the x-nf-request-id for a response for this asset also instead if you like…

You can private message (PM) that to one of our support staff if you prefer and I’ve confirmed that PMs are enabled for your community login. Note, that only one person can see the PM and this will likely mean a slower reply than posting the information publicly. Please feel free to reply to however you prefer though.

Thank for your rapid response
x-nf-request-id: cd485db7-ebf0-4bc5-ae46-351aee152009-3764844
This response has a nf_ab=0.396821 and the home page has nf_ab= 0.500766

Thx :slight_smile:

Hi, @javiernuber, Netlify will set that cookie when making the first HTTP request with a header like so:

set-cookie: nf_ab=0.302946; path=/; expires=Sat, 13 Feb 2021 08:11:47 GMT

Then the browser will send that cookie on all future requests and that will determine the version Netlify serves to that browser.

If you don’t send a cookie header, Netlify will return a new nf_ab value for each request and may send different versions of the split test:

$ curl -svo /dev/null https://prodigy-static-web-prod.netlify.com/manifest.webmanifest  2>&1 | grep nf_ab
< set-cookie: nf_ab=0.143554; expires=Fri, 12-Feb-2021 08:15:16 GMT; path=/
$ curl -svo /dev/null https://prodigy-static-web-prod.netlify.com/manifest.webmanifest  2>&1 | grep nf_ab
< set-cookie: nf_ab=0.487042; expires=Fri, 12-Feb-2021 08:15:26 GMT; path=/

This is expected behavior as, without that cookie, Netlify doesn’t know what version to send and picks a new one - setting a new cookie in the process.

However, if you send the set cookie (or the browser does), Netlify will return the correct and consistent version each time:

$ curl -svo /dev/null -H 'cookie: nf_ab=0.302946' https://prodigy-static-web-prod.netlify.com/manifest.webmanifest  2>&1 | grep nf_ab
> cookie: nf_ab=0.302946
< set-cookie: nf_ab=0.302946; path=/; expires=Sat, 13 Feb 2021 08:15:40 GMT
$ curl -svo /dev/null -H 'cookie: nf_ab=0.302946' https://prodigy-static-web-prod.netlify.com/manifest.webmanifest  2>&1 | grep nf_ab
> cookie: nf_ab=0.302946
< set-cookie: nf_ab=0.302946; path=/; expires=Sat, 13 Feb 2021 08:15:48 GMT

Are you sending the cookie and getting back a different version from the nf_ab cookie than was sent? If so, can you send us information to reproduce?

Also, if you can capture this behavior in a browser, the HAR file capture of that issue would be helpful.

If there are other questions about this, please let us know.

1 Like

Thank a lot for your help :slight_smile: