aboutsummaryrefslogtreecommitdiffstats
path: root/examples/cookie/templates/toppage.dtl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-12-20 14:40:22 +0100
committerLoïc Hoguin <[email protected]>2012-12-20 14:40:22 +0100
commita07d063fd8fc8a1cfadcb35cc89e190695773fe8 (patch)
treeb1f9c4540b8ecdc43538945f6371177b48d3b1b5 /examples/cookie/templates/toppage.dtl
parent659ca05c546ed8b537fe0d36cf5520ad0bc62a0f (diff)
downloadcowboy-a07d063fd8fc8a1cfadcb35cc89e190695773fe8.tar.gz
cowboy-a07d063fd8fc8a1cfadcb35cc89e190695773fe8.tar.bz2
cowboy-a07d063fd8fc8a1cfadcb35cc89e190695773fe8.zip
Add cookie example
Diffstat (limited to 'examples/cookie/templates/toppage.dtl')
-rw-r--r--examples/cookie/templates/toppage.dtl24
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/cookie/templates/toppage.dtl b/examples/cookie/templates/toppage.dtl
new file mode 100644
index 0000000..e6faa2b
--- /dev/null
+++ b/examples/cookie/templates/toppage.dtl
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Cowboy Cookie Example</title>
+</head>
+
+<body>
+ <h1>Cowboy Cookie Example</h1>
+ <p>Refresh the page to see the next cookie.</p>
+
+ <h2>Cookie Set Server-Side</h2>
+ <p>{{ server }}</p>
+
+ <h2>Cookie Set Client-Side</h2>
+ <p>{{ client }}</p>
+
+ <script type="text/javascript">
+// <![CDATA[
+document.cookie="client=test=";
+// ]]>
+ </script>
+</body>
+</html>