4

In the Joomla backend, under Global configuration -> Site I have the following cookie setting information enter image description here

My Joomla website seems to work fine without having completed the cookie fields, so my questions are as follows

  1. Is it safe for me to leave this information blank?
  2. If yes, under what situations would I need to fill it out? (and)
  3. How would I fill it out?

2 Answers 2

5

The default behavior is like this:

  • Cookie Domain: Joomla will use an empty value and the cookie will be valid for the current domain.
  • Cookie Path: Joomla will use / as default value and the cookie will be valid for the whole site.

Thus usually, the default values will be fine.

The cookie domain may be useful if you want a cookie be valid for several subdomains. The cookie path would have to be set if the cookie should only be valid for a certain subdirectory.

1
  • 1
    I'm not sure how Joomla works in this respect, but if an "empty value" is passed as the cookie domain to PHP's setcookie() function or Set-Cookie response header then the browser will set a cookie on the current host only eg. www.example.com (excluding any subdomains), not necessarily the current domain eg. .example.com.
    – MrWhite
    Commented Apr 29, 2014 at 19:22
2

The ‘Domain’ Attribute • With domain set, cookies will be sent to that domain and all its subdomains • The risk with subdomains is lower than when scoped to parent domain, but still relevant • Remove domain attribute to limit cookie to origin host only – Important note: IE will always send to subdomains regardless

1
  • Welcome to the community. Thank you for contributing. Please take the tour and look for more pages that you can offer support to. Commented Jun 15, 2019 at 4:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.