An HTTP cookie is a piece of data stored by the user's web browser. Unless otherwise specified, cookies can be created, read, modified and deleted and modified both by JavaScript and from server-side scripts by reading the headers.

learn more… | top users | synonyms (1)

0
votes
0answers
20 views

Need to make “has_js” cookie expire [on hold]

drupal7 adds the cookie has_js, but for security reasons we dont want the cookie has_js to be persistent. how can I make this cookie expire ? thanks
2
votes
1answer
38 views

Are there any acceptable uses for $_COOKIE['has_js'] outside of core?

Drupal 7 has a cookie called has_js. drupal.js sets this cookie, and it is used by the Batch API and the authorize.php script. There is a rather old issue about this cookie, backport ...
1
vote
0answers
26 views

What is the scope of the drupal session cookie?

I am bootstrapping drupal 7 (using DRUPAL_BOOTSTRAP_FULL) so that I can use drupal's authentication/security features in the rapid development of a web app I'm doing a proof of concept for. (And yes I ...
1
vote
1answer
23 views

google analytics are killed after “cookie control” instalation

I'm new in drupal so I will write as simple as possible. I have installed the "google analytics" (GA) module. I have configured it and it worked. I was able to see live statistics on the GA web-page. ...
0
votes
1answer
46 views

Drupal 7 Webform Cookies

I have a Drupal 7 website that has many downloads, each utilizing the same webform. I would like it when an anonymous user downloads once, then goes to another download (same webform, different ...
0
votes
1answer
138 views

How do I access Session variables in Drupal that were set on non-drupal pages?

If I go print_r($_SESSION) on a drupal page (say mysite.com/ )I only get Session variables set from drupal pages (which are none atm). I can set new ones and they'll show up. Array ( ) However If ...
0
votes
1answer
61 views

Where does Drupal 7 clear my custom set cookies and how do I stop this?

I have parts of my website that are not controlled by drupal that set cookies. When I access a drupal-run page, my cookies get cleared. I tried to investigate which script does this by placing ...
0
votes
1answer
41 views

Caching pages with boost based on a cookie value

I have a Drupal website where a part of each page varies depending on the value of a certain cookie. In order to use Boost in this situation, I was thinking of rewriting the cookie value into a query ...
1
vote
0answers
47 views

How to remain logged in when switching languages via domain Drupal 7

I've got a site which will run in different languages. The language is determined based on the language domain, and the site will thus exists as example.com, example.de, example.fr, example.co.uk and ...
0
votes
0answers
35 views

jQuery Injector, jQuery, and cookies - only working for Admin

I have a function that I am using using the js injector module to set cookies so that I can access them at a later stage (function($) { $(window).on('load', function(){ ...
0
votes
1answer
255 views

Android to Drupal Submission : [CSRF Validation Failed] while using a cookie

The Drupal Version is 7 and the Services version is 3.4. So, My login into Drupal goes like this: Fetch a token. (POST) Fetch a Cookie using the token. (POST) Make GET Requests using ...
0
votes
1answer
362 views

Access denied for admin user after new drupal 6 install

I just installed Drupal 6 (Don't ask why) from a fresh install (Version 6.29). I followed the install steps, created an admin user, set the correct time zone, etc. But when I login and attempt to ...
0
votes
0answers
9 views

Cross domain cookie for same Drupal installation [duplicate]

The English translation of my Drupal installation runs on MYSITE.com and my German translation runs on MYSITE.de. Of course, I want my users to be able to switch languages without having to log in ...
2
votes
1answer
292 views

jquery.cookie.js is loaded only for authenticated users, by jQuery update module

jquery.cookie.js is loaded only for authenticated users and i cannot really figure out why. The page caching is disabled. Any thoughts?
-2
votes
1answer
28 views

cookie is being stored as different value [closed]

I have the following code: if(isset($ret["token"])) { drupal_set_message("TOKEN: " . $ret["token"]); user_cookie_save(array("my_token"=>$ret["token"])); drupal_set_message("KEY: " . ...
1
vote
1answer
62 views

Session cookie prevents pages to load

There is a problem with Drupal 6 site. It seems seesion cookie is preventing some pages to load. Site has approximately 5 to 10 pages (out of 30 000) of difference content types which can't be ...
0
votes
0answers
58 views

How to display block by cookies

I wish to create a Ads banner custom block and show it in lightbox, and have it displayed only 1 time in a day on the frontpage, when next day the user browse again, the banner will popup again 1 ...
3
votes
1answer
240 views

Additional Configuration to disable anonymous session cookies?

I am running a clean install of Pressflow 6.28. I have set the following configurations: Cache Mode: Normal; Min Cache Lifetime: 5 minutes; Page Cache Max Age: 1 day; I have installed no contributed ...
0
votes
0answers
210 views

Passing URL query parameters to menu callback

I'm attempting to save a page's path as a cookie to be recalled later for redirection after being handed back by a third party payment processor. I'm doing this by linking to a custom function with a ...
0
votes
0answers
61 views

Reporting anonymous user who later registers

I want to track distinct anonymous users in Drupal 7. If a user named Amy is browsing the site anonymously, I want Amy's browser to have a cookie locally (and/or PHP session) so, for as long as that ...
0
votes
2answers
361 views

Persistent session cookies: remember session even after closing the browser

I would like to store anonymous users $_SESSION in a cookie so that their cart and other custom information is still available even after closing the browser. I found this interesting post which ...
0
votes
0answers
111 views

Check cookies are enabled in hook_boot: cookies disabled issue

In my hook_boot I am checking cookies are enabled via the following code: function my_module_boot() { if(!isset($_COOKIE['my_cookie'])) { // set a test cookie setcookie('my_cookie', ...
3
votes
1answer
833 views

Services - Creating a node with php curl client returns 401 error - X-CSRF token always empty

A recent update to Services and Drupal requires a csrf token, and it broke the php curl client samples. I am trying the sample code for Services to create a node here ...
2
votes
1answer
787 views

Setting $cookie_domain variable for specific folder structure

During configuration of Ckeditor I have to setup the cookie domain variable. I have added my site in subfolder like www.example.com/mynewsitefolder, where www.example.com is my current and running ...
0
votes
2answers
299 views

Cookies change when I navigate to another page (Using jquery cookie)

For example, the user can change the font size, and it is remembered in the cookies. Say I am on the product page and change the font size there and add the cookie. Everything looks fine, but when I ...
0
votes
0answers
45 views

How to add a condition to check for a cookie and return a bespoke page

I’m in the process of designing a website and want to build it using Drupal 7 however am not 100% sure Drupal will be able to do what I want. I would be really grateful if someone could advise me if ...
0
votes
2answers
124 views

Easy way to add EU cookie notification to multiple Drupal websites?

I have 20+ Drupal sites that I have to add Cookie notifs to. Is there an easy/batch/automated way to do it?
0
votes
1answer
106 views

Store anonymous user selection temporarily until registration

I want to let my first time visitors to first select a city, which will control what they see in my site, so it should be stored where I can see it everywhere (views, search and when posting content) ...
0
votes
1answer
48 views

how to use cookie to protect other node pages in Drupal

some bots are grabbing my site's content everyday,I confirm if I set cookie protection the bots will not work again. My question is how to use cookie to protect my content? if someone has no cookie ...
0
votes
1answer
434 views

COOKIE['session_api_session'] not working in drupal 7

I have a simple module to use the flag module base on the session api. This was working in drupal 6 (and another section working for logged in users), i changed the syntax for drupal 7 (remove ...
0
votes
0answers
327 views

My $_SESSION array in drupal 7 is empty after login

I tried to view the $_SESSION and $_COOKIE details by print_r ing those two arrays But my session array is empty before and after login. I wrote the code in template.php file. But the user is ...
1
vote
1answer
111 views

hook_boot and Varnish

I have a module that implements a hook_boot(), and it checks if user is going to access home page and if user does not have a specific cookie. If both verifications are true, it redirects user to a ...
2
votes
1answer
573 views

Session variables and page cache

My drupal site uses normal cache system, as you'll probably know, the cache_page table is updated using as primary key the REQUEST_URI. This is great because when an anonymous user requests a page, ...
2
votes
1answer
567 views

How to save the URL of anonymous user on a webform?

Using Webform 7.x-3.18, I'd like to save the referring URL of an anonymous visitor on a webform. I added some code to MYTHEME__preprocess_page() in template.php to save the info as a cookie: ...
3
votes
1answer
365 views

is there a way to find out which quicktab tab is active?

I would like to know which tab is active so I can set it to default until another tab is active then that will be set to default my problem is that I cant seem to find a way to see which tab is ...
0
votes
1answer
118 views

how do you add a cookie policy to the site so it appears when a user arrives? [duplicate]

Possible Duplicate: eu cookie compliance I think this is now a legal requirement in the uk so I want to add one but I have not been able to find a module to do it. Has anyone found one or ...
0
votes
1answer
117 views

Single Sign On using PURL domain modifier and different TLDs

I have an organic groups implementation using purl and spaces to set the active space when you visit a domain modifier such as example1.org vs example2.org. The cookie domains are different, so I'm ...
1
vote
2answers
316 views

How to access cookies in Views PHP Code filter?

I have a view that will display nearby locations. The center coordinates would come from a cookie (lat,lng). I am trying to get the cookie with $_COOKIE, but I get an error saying that it is not ...
1
vote
1answer
623 views

User session and https

I've got a few pages on my site that need to be accessed via https. I need to pull some information about the current logged user on those pages. The problem is, users log using http mode and the ...
0
votes
2answers
105 views

Equivalent of OnSessionStart for drupal

I am looking for the equivalent or at least a way to run a snippet of code only when the session starts and at now other time do i want this code run. Can anyone help me with this? Ive looked around ...
2
votes
3answers
466 views

Pressflow 6 forms creating session cookies

We have a Pressflow 6 website behind a Varnish cache but our cache hit-rate is awfully low. I've recently found that stripping the "Cookie" header from requests completely increases the hit-rate to ...
1
vote
1answer
128 views

Where should I add the unique identifier cookie code?

I want to add a unique identifier in a cookie when the user (anonymous or logged) visits the website. Where should I call this code. I tried calling the code in hook_init but that doesn't work on ...
6
votes
2answers
703 views

eu cookie compliance

With the new EU cookie compliance law coming into force Friday (26/05/12), does anyone have any suitable advice for those of us who not only develop in Drupal and other frameworks? I myself have a ...
0
votes
1answer
111 views

Access JavaScript cookie in module file

I am setting a cookie in an external JavaScript file with the current user time. I want this time to be available to the server, so I am retrieving this from a cookie. I am able to fetch the value, ...
3
votes
1answer
2k views

Set a cookie whenever front page is viewed

I run a Drupal 7 site (currently 7.15) since longer time and have the problem with cookies: I need 2 cookies for non-Drupal PHP-scripts at my web site. I set them in the hook_init of my custom ...
0
votes
1answer
3k views

How to read the session cookie with javascript?

I'm trying to detect with javascript if a user is logged in. For some reason the drupal session cookie is not showing up when I use alert(document.cookie); It does show ...
0
votes
1answer
306 views

How to redirect a user to a visited sub-domain on his next visit to main domain

I have a website say example.com with 5 sub-domains: site1.example.com, site2.example.com, site3.example.com, site4.example.com, and site5.example.com. When users visit example.com, they are ...
0
votes
1answer
3k views

Trouble with session ID and Drupal cookies when trying to establish a connection with Service Module and http-post

I am trying to complete an http-post between my common lisp application and my Drupal Site running Services and a Rest server. Currently I have my rest server set up to accept user login, and using ...
0
votes
1answer
382 views

Cookies for a webform using page breaks

I'm using the Webform module in a Drupal 6 installation. This webform is appearing in an iFrame, and can be found on every page. The website that contains the iframe is static, the Drupal installation ...
2
votes
2answers
1k views

User logout on browser / tab close

How to modify Drupal user's cookie so the cookie is not available anymore after a predefined time or when the user close his web browser or close all of the websites pages open in tabs ? After some ...