Learn something new every day


Until today, I did not realize that any HTTP requests made by a Flash movie (including LoadVars.load(), MovieClip.loadMovie(), Sound.loadSound(), etc) includes cookies — the cookies that would normally be sent by the browser anyway. In retrospect, this makes sense and is perhaps even obvious: since the Flash player asks the browser to make the connection, then it really is the browser doing the requests, so why wouldn’t the browser send and receive cookies as normal? For some reason, though, it was a surprise to me.

What does this mean? It means that it’s much easier for a widget to work in conjuction with PHP sessions, for example: I had been putting the session ID in FlashVars so that the Flash movie could add the cookie manually with addRequestHeader(), but it turns out that that is unnecessary.

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts
Need a new theme
Deeper into the rabbit hole: Gmail scripting part 3!

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

Which version of Flash is this? I am having cookies crumble with Flash CS3 Pro (Actionscript 3.0).

flash 8. hmmm looks like this needs more investigation…?