fa directory created

This commit is contained in:
Maryam Behzadi
2018-05-27 18:16:37 +04:30
parent 3eb589a71c
commit 8e905d75f5
469 changed files with 17013 additions and 0 deletions

11
fa/06.0.md Normal file
View File

@@ -0,0 +1,11 @@
# 6 Data storage and sessions
An important topic in web development is providing a good user experience, but the fact that HTTP is a stateless protocol seems contrary to this spirit. How can we control the whole process of viewing websites for users? The classic solutions are using cookies and sessions, where cookies serve as the client side mechanism and sessions are saved on the server side with a unique identifier for every single user. Note that sessions can be passed in URLs or cookies, or even in your database (which is much more secure, but may hamper your application performance).
In section 6.1, we are going to talk about differences between cookies and sessions. In section 6.2, you'll learn how to use sessions in Go with an implementation of a session manager. In section 6.3, we will talk about session hijacking and how to prevent it when you know that sessions can be saved anywhere. The session manager we will implement in section 6.3 will save sessions in memory, but if we need to expand our application to allow for session sharing, it's always better to save these sessions directly into our database. We'll talk more about this in section 6.4.
## Links
- [Directory](preface.md)
- Previous Chapter: [Chapter 5 Summary](05.7.md)
- Next section: [Session and cookies](06.1.md)