Wednesday, December 17, 2008

I just had my first run in with shared objects. The client wants the user to see a video the first time they open the homepage and then to see page2 for every other time the user opens the homepage. I had read about sharedObjects before and by referencing the help docs they were pretty easy to implement.

However, attempting to remove the little buggers is a different story. I figured I would just need to clear my cookies and reload the page. Nope. Hmmm, clear cache and reload? Not so much. Clear everything? Offline Content, Search History, Browsing History, etc? No, No, and more no. Those buggers are like cockroaches.

Turns out with a little research I found out that Flash Objects are their own beast. They live outside the browser and therefore are not controlled or contained by the browser. Fair enough.

For Windows users you can find these guys hiding in the following default location:

The first time I opened that folder was a bit scary. Its amazing how many sites have been collecting information about me without me knowing. I thought I was somewhat safe by deleting cookies, little did I know I had all these friends hiding in my application folder.

To remove them you just simply delete them from their corresponding folder. Next time you visit the site they will be recreated automatically.

@BrentI think that would just delete the myname attribute of the SUserName shared object. I would think the object would remain. From the help docs it looks like you would need to call mso.clear() instead of flush since flush writes the data.

@AranThanks for the link. I had opened one up in wordpad and could see the different elements but it was also scattered with crazy characters. Sounds like this would be much easier.