I’m having trouble wrapping my brain around something.
If I open a URL manually in a browser window the cookies for that URL are used. If, however, I use the jquery ajax functionality to make requests to the same URL (even from a local html\javascript file) the same cookies are not used.
Is what I’m trying to do possible? Why or why not?
It is almost assuredly a cross-domain restriction. If I have a script that is served from domain.com it can only make AJAX requests to domain.com. When I attempt to make a request to “another-domain.com”, the browser will NOT send cookies along with the request, and when the result is ready, will not give that result to my script.
The same is true of local files. Scripts from local files can not successfully make requests to any domain.