--- title: "Cookieの設定と削除の方法 | Autify Guide" slug: "is-it-possible-to-set-and-delete-cookies" description: "AutifyでのCookieの設定と削除の方法について説明します。" tags: ["JSステップ"] updated: 2024-10-31T06:07:34Z published: 2024-10-31T06:07:34Z canonical: "help.autify.com/is-it-possible-to-set-and-delete-cookies" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # Cookieを設定・削除することは出来ますか? 表示言語の切り替えや、A/Bテストの切り替えにCookieを使用することがあるかもしれません。 [JSステップ](/v1/docs/ja/javascript-steps)を利用することで、Cookieを設定したり削除できます。 Cookieに値を設定したい場合は以下のように記述します。 ``` document.cookie = 'cookie_name=cookie_parameter'; document.cookie = 'lang=ja'; /* よくある言語設定 */ ``` 設定されているCookieを削除したい場合は以下のように記述します。 ``` document.cookie = 'cookie_name=; max-age=0'; ``` HttpOnly属性を持つCookie HttpOnly属性を持つCookieは、JavaScriptによるアクセスを禁止されているため、JSステップで設定・削除することはできません。