Cache VS Session VS cookies?

前端 未结 8 755
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-02 04:09

What are the do\'s and don\'ts about Cache VS Session VS Cookies?

For example:
I\'m using Session variables a lot and sometimes have problems in a booking-applic

8条回答
  •  遥遥无期
    2020-12-02 04:53

    Cookies are stored in browser as a text file format.It is stored limit amount of data.It is only allowing 4kb[4096bytes].It is not holding the multiple variable in cookies.

    we can accessing the cookies values in easily.So it is less secure.The setcookie() function must appear BEFORE the tag.

    Sessions are stored in server side.It is stored unlimit amount of data.It is holding the multiple variable in sessions. we cannot accessing the cookies values in easily.So it is more secure.

提交回复
热议问题