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?
Share
You certainly don’t have to get the cookie data in the preinit event, but it helps in two ways:
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.