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
15 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
46 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
39 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
0answers
20 views

how to find out which module adds session [closed]

I am fighting unwanted session in header preventing page caching for anonymous user. How can I find out, which module adds it? (I do not want to waste time disabling them one by one) Thank you.
0
votes
1answer
23 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
186 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
121 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 ...
0
votes
0answers
25 views

view slideshow incorrect remembering the last slide

this module is not remember the last slide correctly i checked the cookie which set and tried to correct its value but still ignore the cookie i see it depends on wrong computations how to fix it ...
0
votes
1answer
66 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
281 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
230 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
176 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
48 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
82 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
155 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 ...
0
votes
1answer
224 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
60 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 ...
0
votes
0answers
168 views

Help with drupal cookies on domain access

got to work with drupal and domain access module. Everything is/went well until I decided to have cookies for my visitors. On registration the user gets the domain they registered on as their home ...
3
votes
2answers
241 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 ...
0
votes
0answers
388 views

Maintain session through REST web services

I have created a web service that makes authenticated requests to server. I will pass Cookie header with session name and session id as value, and the header will be compared to the cookie that is ...
0
votes
0answers
71 views

How to include Affiliate Cookies in my Drupal 7 site

I am developing my first D7 site. I have tried hard to find the answer on the various Drupal sites but think I am looking in the wrong places. I am trying to include 3rd Party Affiliate cookies, ...
1
vote
1answer
90 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
308 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
86 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, ...
2
votes
1answer
1k 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
2k 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
229 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
1k 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
275 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
1answer
554 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 ...
0
votes
2answers
107 views

How do I set a tag via cookie and filter content on the whole site based on that tag?

I have a site which has different tags for different cities. Most of the content on the site is either for all cities or a set of specific cities. I am planning to have all the content pieces taggable ...
1
vote
1answer
105 views

Download Confirmation Form

I would like to add a confirmation page for downloads. How can I achieve it?
3
votes
1answer
441 views

How to obtain Drupal session cookie via an XMLRPC request?

I would like to implement single sign-on to Drupal and other site (not PHP) via xmlrpc. Is there a way to make an xmlrpc call with user name & password and in return obtain information on success ...
4
votes
2answers
1k views

How should I share sessions transparently across domains?

I work on a Drupal site which has multiple domains (not sub-domains) using Domain Access to set different themes, display different content, etc. on each of them. These multiple domains are used for ...
0
votes
1answer
590 views

Cache page based on cookie value and URL

I am working on a site that is multi-lingual as well as multi-country. This means that pages will show content differently depending on a country cookie that is set when the user first visits the ...
1
vote
2answers
378 views

Why can't I change values in my cookies?

I'm storing my users city in a cookie. I want that cookie to expire by browser session, so I don't want to store this information in $_SESSION, because I want $_SESSION to persist for the default ...
3
votes
1answer
129 views

How to change the duration of user access?

By default Drupal keeps users logged in 2.000000 seconds, i modify in settings.php at the line: ini_set('session_cookie_lifetime',2000000); It is right ?
1
vote
2answers
142 views

Best way for implement 'Site Gate'

I try to add 'site gate' to http://bartenderlab.it. It's alcohol content so people under 18 are not allowed to view this site. I created module with hook_init: function gate_init() { $curr_uri ...
1
vote
1answer
127 views

Discovering cookie session data

Can anyone advice me on how I can discover the active cookie details for a user logged into a Drupal website?
5
votes
1answer
223 views

Remember users Taxonomy choice, such as which city to filter the site by?

I want to convert an existing site to support the selection and association of Cities. Each node can be associated with a City, and the Cities will be selectable as tabs at the top of each page. Lets ...
3
votes
2answers
3k views

Storing anonymous user information in a cookie

I want to store the zip code of a user, if they use it for a proximity search in a cookie. However, I don't know where or how to start to implement this. How do I store anonymous user information on ...
3
votes
3answers
2k views

How do Pressflow Drupal sites handle user Cookies?

Is this something handled by Drupal? What PHP, Apache, Varnish settings affect cookies? Additionally, what's the difference in cookie handling between plain-vanilla Drupal and Pressflow? I was ...
2
votes
3answers
1k views

Drupal caching prevents cookie read

On one of my production sites I wrote a jQuery stylesheet switcher. It drops a cookie when a selection is made and uses php to select the corresponding stylesheet on pageload which overrides styles. ...