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 1088725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:06:44+00:00 2026-05-16T23:06:44+00:00

With Rails 3, the default session storage mechanism is cookie_store. I assume that this

  • 0

With Rails 3, the default session storage mechanism is cookie_store. I assume that this means that the contents within the session hash are serialized, encoded and stored within a cookie in the browser? Does this mean that nothing (or very little) of the session is stored in the server?

I’ve had a few issues where I had a cookie overflow error and I’m assuming because I kept on adding to my user instance (which was also linked/fetched from the cookie).

u = session[:user]
u.add_this lots_of_data

so eventually I got a cookie overflow error.

Am I correct about this? Are sessions fully stored within cookies in Rails 3 (by default)?

  • 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-05-16T23:06:45+00:00Added an answer on May 16, 2026 at 11:06 pm

    Yes, if you use the cookie store, the session data is stored in the cookie. If you’d like to store it on the server, you will need to use another session store.

    However, if you are storing model objects or “lots of data” in the session, you are most likely doing it wrong in the first place. Your data should go to the database, and the session should only contain as much information as you need to retrieve it.

    In you case, this would mean to store the user id int he session, and load the user from the db in a before_filter.

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

Sidebar

Related Questions

The default in Ruby on Rails is to have this set to false (in
Using Rails 3.1.3 with Ruby 1.9.3p0. I've discovered that by default, Rails does not
The rails session cookie is HttpOnly by default but the remember_user_token cookie set by
I often want to clear the session store in Rails, in particular, the default
Anyone have any best practices tips for Rails and sessions? The default session type
I thought methods such as name and email were default in rails? In my
Rails question. The default behavior for error validation is to fieldWithError-styled div around the
By default the form post CSRF protection in Rails creates an authenticity token for
I know rails provided CSRF protection by default from rails3. but my web application
In Rails 3.2 I'm trying to set a default OdontologicUnity instace when a User

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.