I would like to create a cookie that expires 5 minutes after a user visits my page.
I know about the add_cookie() function, but I have no idea how to set its expiration.
add_cookie()
You can set cookies in the scripts/response_main.ts file as follows:
scripts/response_main.ts
set_cookie("cookie_name", "cookie_val") cookie("cookie_name") { cookie.expires("Wed, 09 Jun 2021 10:18:14 GMT") }
For more information, refer to this link .
Source: https://habr.com/ru/post/1495430/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1495425/regular-expression-with-positive-lookbehind-at-beginning-fails-to-match-whole-string&usg=ALkJrhjPMJ0zehyDIfScEPAkgzb7GZ_m4QConnecting to mysql database via SSH via PHP - phpHow to save action / title bar but hide notification bar - androidWhy am I getting a 'module' object not callable in python 3? - pythonHadoop-LZO weird native-lzo library unavailable error - javaNoReverseMatch: with '()' arguments and keywords - djangoAssembling Unable to load in shadow copy AppDomain - appdomainHow to deal with NSJSONSerialization failure when disconnected from the Internet - jsonHow to make a variable width input field - htmlHow to enable the library when starting SAS? - sasAll Articles