<commit_before>---
permalink: "pat/cookietrigger/"
title: Cookie Trigger
---

# Cookie Trigger pattern.

Show a DOM element if browser cookies are disabled.

## Example

<div class="portalMessage error pat-cookietrigger">
 Cookies are not enabled. You must enable cookies before you can log in.
</div>
<commit_msg>pat cookietrigger: Make clear, the pattern works.<commit_after>---
permalink: "pat/cookietrigger/"
title: Cookie Trigger
---

# Cookie Trigger pattern.

Show a DOM element if browser cookies are disabled.

## Example


If you do not see a message between the following START and END, you have cookies allowed and this pattern works.

START

<div class="portalMessage error pat-cookietrigger">
  Cookies are not enabled. You must enable cookies before you can log in.
</div>

END


```html
<div class="portalMessage error pat-cookietrigger">
  Cookies are not enabled. You must enable cookies before you can log in.
</div>
```
{'fraction_non_alphanumeric': 0.08945686900958466, 'fraction_numerical': 0.0, 'mean_word_length': 4.164835164835165, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2113255', 'n_tokens_mistral': 279, 'n_tokens_neox': 271, 'n_words': 122}