Oct 20, 2012

Cookies, WordPress and legislation

Filled under:


With recent legislative changes in relation to e-commerce websites in general and it is becoming more difficult to have a website up legally, but everything is to respect the privacy of users right?.

There are cases extremely rigorous, as the United Kingdom, perhaps the most punctilious in the notice of cookies to visitors, but where it gets tricky is in Spain especially , because we have to add the notice requirements of storage of cookies to here, because we are more cool than anyone, virtually any website and blog, e-commerce is considered , so that only in rare cases would be exempted from implementing the legislation on cookies.


But not me, because as well quote my friend Paul Burgess , an expert in new technologies ...

Cookies Law (or Law Cookie) requires professional web owners to prevent cookies being installed on the computers of their users unless they have given prior informed consent to it.

So what do we do with our WordPress?

Well the first thing is to know what cookies stored WordPress that in a standard installation, and no active plugins, were these:

Cookies safety, the WordPress secret keys and session are these:

AUTH_KEY
SECURE_AUTH_KEY
LOGGED_IN_KEY
NONCE_KEY
The default duration of these keys is:

48 hours or closing the browser
14 days to check the box on the access of " remember me "
You can change this behavior, even the cookie expiration session manually or plugins, expanding or reducing the time.

Some ways to modify these times would be:


  1. Change session cookies manually in the file wp-config.php , which forces a new access for all users to delete cookies earlier. The new cookies get them here
  2. Using a plugin like Set login timeout to let you modify those default times.

Then there are other cookies for comments, also temporary, that are stored on the visitor's computer under certain conditions, these:

comment_author
comment_author_email
comment_author_url
The duration of these cookies depends fundamentally on the visitor's browser settings , saved only if you have configured in the browser. Although the current legislation should warn if or if .

To this end, for a notice of acceptance of cookies is not worth storing of having a privacy page ( here an example of privacy page that includes the Dart cookie), but we must warn the visitor and have your express acceptance .
the virtual court

There are some plugins that promise to offer this but the truth is that I have tried almost all and are a full . decent only thing so far is this script , you can see up in the web of Abanlex lawyers (the company of my buddy Paul).

But, as I have noted above, this is not always true, because there are plugins that add their own cookies , any surveys, for example. So if you want to know what your cookies using WordPress , with all plugins installed, you can create a function that, on one page, do you list them all and their values ​​and times.

The first is to add this code to your plugin function or file functions.php of the theme you're using:

function get_cookies( $paras = '', $content = '' ) { if ( strtolower( $paras[ 0 ] ) == 'novalue' ) { $novalue = true; } else { $novalue = false; } if ( $content == '' ) { $seperator = ' : '; } else { $seperator = $content; } $cookie = $_COOKIE; ksort( $cookie ); $content = "<ul>\n"; foreach ( $cookie as $key => $val ) { $content .= '<li>' . $key; if ( !$novalue ) { $content .= $seperator . $val; } $content .= "</li>\n"; } $content .= "</ul>\n"; return do_shortcode( $content ); } add_shortcode( 'cookies', 'get_cookies' );
              :                                                                                   
And then you want to put this shortcode to display the cookies:

[ cookies ]

At least you'll know, and your visitors, if you put that information on your privacy page , the cookies stored on your WordPress.

Oh, and for Megafans of social media and the mother who bore him , to know that if you have corporate Facebook page there are also breaking the law of Cookies .

And now the little question of yore ...

I'm telling you now, not yet, because I'm still trying to find the best way, but I think I decantare by scritp aforementioned.

0 comments:

Post a Comment