Frontend에서 cookie사용하는 법

유림·2022년 9월 16일
0

Tech interview

목록 보기
7/11
post-thumbnail

📍사용하는 방법

  1. javascript에 "document.cookie"를 만들기

  2. 만들 때 들어가야할 내용 3가지
    1) 이름 : user=kdt
    2) 시간 : expries = 19 Sep 2022~~
    3) 경로 : /

  3. expires값은 만약 브라우저 시간과 비교했을 때 이미 지났거나 해당이 안될 경우 자동으로 삭제 처리 된다

개발자 도구 -> Application -> Application -> Storage -> Cookies

profile
ɪ ʜᴏᴘᴇ ᴛᴏ sᴏʟᴠᴇ ʀᴇᴀʟ ᴘʀᴏʙʟᴇᴍs👩🏻‍💻❤️

0개의 댓글