Pete Donnell

In reply to by Noel

Hello Noel, apologies for the delayed reply. You need to set it in backend code. In the PHP-based example above, this is the relevant line: session_set_cookie_params(0, $dirname, $_SERVER['HTTP_HOST'], $https, true);. You need to set the third parameter to the empty string, for example session_set_cookie_params(0, $dirname, '', $https, true);. Note that in the years since this article was originally written, there is also an alternative format for the session_set_cookie_params() PHP function. See the official documentation for the specifics. If you need to set the samesite cookie attribute, which is recommended for many secure sites, you will need to use the new format.

Mon, 05/09/2022 - 14:37 Permalink

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <p> <br> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA