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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:06:32+00:00 2026-05-21T20:06:32+00:00

I have been seeing alot of code examples online of retrieving cookie data during

  • 0

I have been seeing alot of code examples online of retrieving cookie data during the preinit event, but i don’t understand why you would want/have to do it there. Is it a steadfast rule that you should also be getting the cookie data in the preinit event?

  • 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-21T20:06:33+00:00Added an answer on May 21, 2026 at 8:06 pm

    You certainly don’t have to get the cookie data in the preinit event, but it helps in two ways:

    1. You minimize the potential of cookies getting modified in later events during the page life cycle.
    2. If you are trying to affect things in the control tree using values read from a cookie, then you need to get that value during pre-init to ensure those values have a chance to do their job. Otherwise it would be too late and control collection will have already been built.

    If you don’t need those values to affect your page structure, or control flow, then you can read them whenever you want. It just happens to be that most people use cookies to change things early in the page life cycle so they read it during PreInit.

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

Sidebar

Related Questions

I have been seeing code like this usually in the start of header files:
I have a multi-threaded app that uses Core Data. I've been seeing a lot
So, I've been seeing a lot of SQL examples on this site. I have
Lately, I've been seeing a lot of sites that have clickable objects that don't
Q1: Is there something like too much ajax?? Explanation: I have been seeing programmers
have been playing with Cubepoints (wordpress plugin) and have installed the ranks module but
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
Have been searching how to convert a dictionary to a string. But the results
I've been looking around on SO and have been seeing a lot of questions
I have been tasked with looking into our deployments, and seeing where they can

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.