In my application, when / iframe is requested, I make cookies and serve the iframe.html file I am In the HTML file, I use a JavaScript Ajax call to request user data (/ user), which is called at $ (document). Before that and need to pass SID to the cookie (so I know that the call is certified).
The problem is that, Cookie-SID with AGX is not nearby, call for the first time / iframe is requested (when there is no cookie) After reloading, the cookie-sid / user is passed with the call.
Do anyone have any suggestions on fixing the initial weight?
I know that the browser receives and stores the cookie, every time a new page is requested it sends it back to the web site, but does it also get the initial AX call Does the count for?
By default, "credentials" such as cookies and HTTP authority information use XMLHttpRequest Is not sent in cross-site requests. To send them, you have to set the credential property of the XMLHttpRequest object.
Example
var request = New XMLHttpRequest (); Var url = 'http: //bar.other/resources/credentialed-content/'; Function call operator daemon (if {request} {request.open ('gET', url, true); Request.withCredentials = "true"; Request.onreadystatechange = Handler; Sent request (); }
Comments
Post a Comment