Hmm it could be that NW.js is treated as the same host (same IP) as the one you're trying to connect to, while Chrome preview starts it's own "server" and has it's own IP.
I am not sure how NW.js preview is treated from this perspective. It could also be related to some Chromium args like "--disable-security" or something.
And It's possible that AJAX works differently for NWjs. It may actually search for the file locally.
Can you check what will something like this log to the console both in the Browser and NWjs?
It's interresting that it works in NWjs. I'm curious what's behind it. Ashley is this maybe something you would know from the top of your head?