I have an image uploader (http://valums.com/ajax-upload/) that uses an iframe as a fallback for processing. My site uses cookies to store the user information. Will the cookie with the user information be passed onto the iframe (I need to know the user's id when processing the images). The iframed pages is on the same domain as where the cookie is generated.
Only the domain which created the cookie can read its cookie. So you have to read the cookie from within the iframe and then pass it to the parent window. If you don't have access or control over the page in the iframe then there is no way to get the cookie value.
Website content loaded in iframes from third party content providers like YouTube may set cookies and thereby require the visitor's prior consent. To hold back cookies until the website visitor has consented, Cookiebot will postpone loading the video until the visitor has consented.
If the iframe is the same domain and the page with your javascript, then you can remove the iframe's cookie by setting the expiration date as you have indicated. But, you cannot prevent the iframe from setting that cookie again with its own javascript or via its own server.
Yes, if the iframe's source is the same domain as your parent page then any request originating from the iframe should send the same cookies.
Also, if you have Javascript being loaded into the iframe that should be able to access those domain's cookies as well.
If you set cookies like:
set-cookie: some-key=some-value; path=/;
YES
but if you use something like:
set-cookie: some-key=some-value; path=/;
set-cookie: some-key=; path=/ajax-upload/;
NO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With