Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9180969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:10:40+00:00 2026-06-17T18:10:40+00:00

all CI users know that by default sessions are stored in cookies. But what

  • 0

all CI users know that by default sessions are stored in cookies.

But what exactly is the point of this implementation? I really can’t find a good reason.

OK, in a shared server people might gain access to the session files but what about the client side? I could change the data in the cookie as well and being a “one-way” method how do I even validate the data in session cookie on the server side?
I find it very odd, not to mention the cookie could encounter problems of size.

I’m aware of the database method but what if I’m in a dedicated server with full control and I don’t want to waste db resources to query the session table at very single page wouldn’t have been more flexible/useful to offer by default the classic PHP method so I can validate the data with the ID in the cookie?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:10:41+00:00Added an answer on June 17, 2026 at 6:10 pm

    You can use CSRF protection and encrypt the cookies to strengthen the system against cookie manipulation.

    If you are concerned about security, though, you absolutely should be using the db for sessions. Unless you have tons of users, the hit on the db will be negligible. If you do have tons of users, time to think about distributing the workload as the session lookup will be the least of your worries.

    The client cookies are more for state. They can be used for things like “remember me” on login forms or for a page layout or something. They should not be used for securing your application.

    You can not verify a session via cookie if you are not using db sessions as there is no where for the application to store the session id.

    Please see http://ellislab.com/codeigniter/user-guide/libraries/sessions.html for more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that I can set the default tab / application for all users
Seems that lot of people already know that issue but I can not find
I really should know this, but I've worked mainly with Linux, Mac OS X
We all know that openId has become such a popular method for user authentication,
i know that django uses unicode strings all over the framework instead of normal
As I know alpha composition uses straight alpha basically. But all GLES blending sample
I have a text area where user can write his SMS. You all know
I'm trying to find all Users with an id greater than 200, but I'm
I know that this is a simple question and asked by many more many
I am using force_ssl in my Users and Sessions controllers. This works great. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.