File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
examples/official-site/sqlpage/migrations Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 22INSERT INTO component (name, description, icon)
33VALUES (
44 ' cookie' ,
5- ' Sets a cookie in the client browser, used for session management and storing user-related information.
6-
7- This component creates a single cookie. Since cookies need to be set before the response body is sent to the client,
8- this component should be placed at the top of the page, before any other components that generate output.
5+ '
6+ Sets a cookie in the client browser, used for session management and storing user-related information.
97
10- After being set, a cookie can be accessed anywhere in your SQL code using the `sqlpage.cookie(' ' cookie_name' ' )` pseudo-function.' ,
8+ This component creates a single cookie. Since cookies need to be set before the response body is sent to the client,
9+ this component should be **placed at the top of the page**, before any other components that generate output.
10+
11+ After being set, a cookie can be accessed anywhere in your SQL code using the `sqlpage.cookie(' ' cookie_name' ' )` pseudo-function.
12+
13+ Note that if your site is accessed over HTTP (and not HTTPS), you have to set `false as secure` to force browsers to accept your cookies.' ,
1114 ' cookie'
1215 );
1316-- Insert the parameters for the http_header component into the parameter table
@@ -119,4 +122,4 @@ SELECT ''text'' as component,
119122 ' ' Your name is ' ' || COALESCE(sqlpage.cookie(' ' username' ' ), ' ' not known to us' ' );
120123```
121124 '
122- );
125+ );
You can’t perform that action at this time.
0 commit comments