Wednesday, December 9, 2009

Cookies Banned In Europe? WTF?!

Ok, here's one for the ages. The EU has enabled a law that bans the use of cookies on a website unless the visitor has "opted in." You can read all you want about it here: http://www.theregister.co.uk/2009/11/25/cookie_law/

Do the people enacting this law have any idea how the web operates? Or what kind of enforcement strategy they would even use? What if the server is outside Europe but the visitor is inside? Do they know that every major browser today allows you to do this already?

Here is a humorous comment by Information Society Commissioner Viviane Reding:

"In the E-Privacy Directive it is made very clear that a user can only give out his private data if there is prior consent so if there are spy cookies there must be a prior consent of the user, very clearly so. But there are also the so-called technical cookies, those which make the whole infrastructure of the internet function. Those are not concerned by this rule, just to clarify, because there were some critics that this amendment would make it impossible for the internet to function. It does not, it is a guarantee for the rights of the consumers."


Sorry Viviane, but the distinction between "technical cookies" and "spy cookies", as you refer to them, is virtually impossible to separate. For instance, we employ multivariate testing on a variety of our websites to make sure that the best combination of a webpage is shown to certain types of users. The cookies involved are clearly used for tracking purposes, but without them our pages won't even load. Not to mention that if we increase our "conversion" we are actually creating a better web experience for all of the visitors to our page.

It's like they think marketers or websites use cookies to locate and eat citizen's puppies or something. I for one would love to see a new law enacted where every politician for any government has to pass a simple IT test before they take office. Then maybe we can avoid wasting time and taxpayer dollars on idiotic things like this and focus more on the real issues facing society today.

Wednesday, August 12, 2009

Fixing Firefox 3 with Shared /home

Ok, I finally made the plunge at the office and am moving all of our workstations over to a system where the /home directory is shared via GlusterFS (www.gluster.org) and I use NIS for central authentication. Everything works beautifully, but today I came upon a very strange issue related to Firefox 3. It turns out the FF is known to have issues with shared /home directories since they moved to SQLite. I found bugs reported with NFS, AFS, GlusterFS, etc.

Here is my down and dirty fix. Basically a script on login sets up a /tmp/firefox-$USER folder and symlinks ~/.mozilla/firefox there. On logout another script copies everything in /tmp back to a folder at ~/.mozilla/firefox-sync. I am using this on Ubuntu Jaunty and these instructions are for it.

Step 1: sudo nano /etc/gdm/PostLogin/Default
#!/bin/bash

# move the .mozilla/firefox directory if there
if [ ! -L "$HOME/.mozilla/firefox" ]; then
if [ -d "$HOME/.mozilla/firefox" ]; then
mv "$HOME/.mozilla/firefox" "$HOME/.mozilla/firefox-sync"
fi
fi

if [ ! -d "/tmp/firefox-$USER" ]; then
mkdir "/tmp/firefox-$USER"
else
rm -rdf "/tmp/firefox-$USER/"
mkdir "/tmp/firefox-$USER"
fi

chown -R $USER:$USER /tmp/firefox-$USER

# copy the users files over
cp -rpdf $HOME/.mozilla/firefox-sync/* /tmp/firefox-$USER/

# create the link
if [ ! -L "$HOME/.mozilla/firefox" ]; then
ln -s "/tmp/firefox-$USER" "$HOME/.mozilla/firefox"
fi
Step 2: sudo chmod 755 /etc/gdm/PostLogin/Default

Step 3: sudo nano /etc/gdm/PostSession/Default

#!/bin/bash

#this moves all the data out of tmp back to the firefox.sync folder
if [ -d "/tmp/firefox-$USER" ]; then
rsync -a --delete /tmp/firefox-$USER/ $HOME/.mozilla/firefox-sync/
fi

Step 4: sudo chmod 755 /etc/gdm/PostSession/Default

I hope this helps someone out there that is trying to remedy this behavior on their network