Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 1st Oct 2015, 03:24 AM   #1
Active Warrior
 
Join Date: 2015
Posts: 49
Thanks: 85
Thanked 0 Times in 0 Posts
Default
cookie compliance? any tips (java, css)?
Share on: 
fb share twitter share gplus share more share

Hi guys,

i was wandering if there is any other way to write a cookie compliance code in css only?

i mean i found many tutorials, all using java... is there a css only one?

if not, which java is best according to you? (light and fast loading)?

“Watch your thoughts, they become words;
watch your words, they become actions;
watch your actions, they become habits;
watch your habits, they become character;
watch your character, for it becomes your destiny.” F.O.
Arcsn is offline  
Unread 1st Oct 2015, 04:19 AM   #2
Active Warrior
 
Join Date: 2015
Location: Kherson, Ukraine
Posts: 42
Thanks: 0
Thanked 8 Times in 8 Posts
Default
Re: cookie compliance? any tips (java, css)?
Share on: 
fb share twitter share gplus share more share

Hi Arcsn)

Originally Posted by Arcsn View Post

i was wandering if there is any other way to write a cookie compliance code in css only?

i mean i found many tutorials, all using java... is there a css only one?
CSS - Cascading Style Sheets. Therefore, using CSS can not change the cookies. You have to use php or js.


Originally Posted by Arcsn View Post

if not, which java is best according to you? (light and fast loading)?

you can use this code:

Code:
function set_cookie ( name, value, exp_y, exp_m, exp_d, path, domain, secure )
{
  var cookie_string = name + "=" + escape ( value );
 
  if ( exp_y )
  {
    var expires = new Date ( exp_y, exp_m, exp_d );
    cookie_string += "; expires=" + expires.toGMTString();
  }
 
  if ( path )
        cookie_string += "; path=" + escape ( path );
 
  if ( domain )
        cookie_string += "; domain=" + escape ( domain );
  
  if ( secure )
        cookie_string += "; secure";
  
  document.cookie = cookie_string;
}

set_cookie ( "key", "value" );
wordpress+expert is offline  
The Following User Says Thank You to wordpress+expert For This Useful Post:
Unread 1st Oct 2015, 05:21 AM   #3
Active Warrior
 
Join Date: 2015
Posts: 49
Thanks: 85
Thanked 0 Times in 0 Posts
Default
Re: cookie compliance? any tips (java, css)?
Share on: 
fb share twitter share gplus share more share

perfect. i was suspecting that css only is not a solution.

I'll try to implement your code and see how is going...

“Watch your thoughts, they become words;
watch your words, they become actions;
watch your actions, they become habits;
watch your habits, they become character;
watch your character, for it becomes your destiny.” F.O.
Arcsn is offline  
Unread 13th Oct 2015, 02:48 AM   #4
Active Warrior
 
Join Date: 2015
Posts: 49
Thanks: 85
Thanked 0 Times in 0 Posts
Default
Re: cookie compliance? any tips (java, css)?
Share on: 
fb share twitter share gplus share more share

unfortunately this script is not working... this code shows the cookie value as null and undefined.

will search for different one...

“Watch your thoughts, they become words;
watch your words, they become actions;
watch your actions, they become habits;
watch your habits, they become character;
watch your character, for it becomes your destiny.” F.O.
Arcsn is offline  
Closed Thread


Bookmarks

Tags
compliance, cookie, css, java, tips


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 03:50 PM.