Change record status: 
Project: 
Introduced in branch: 
7.x
Introduced in version: 
7.83
Description: 

Drupal 7 no longer uses a has_js cookie by default.

If a site needs to restore the has_js cookie for any reason, there's a variable which can be set:

/**
 * Retain legacy has_js cookie.
 *
 * Older releases of Drupal set a has_js cookie with a boolean value which
 * server-side code can use to determine whether JavaScript is available.
 *
 * This functionality can be re-enabled by setting this variable to TRUE.
 */
# $conf['set_has_js_cookie'] = FALSE;

https://git.drupalcode.org/project/drupal/-/blob/7.x/sites/default/defau...

(n.b. the link about should be changed to point to 7.83 when the release is tagged)

If this variable is set to TRUE, Drupal will set the cookie with the following attributes:

document.cookie = 'has_js=1; path=/; SameSite=Lax';

If different attributes are required, this will have to be done with custom code (or a contrib module if anyone wants to create one for this purpose).

Impacts: 
Site builders, administrators, editors
Module developers
Themers
Site templates, recipes and distribution developers