Better to get value from PHP variable or from cookie? -


assume there php variable:

$variable = 'username'; cookie value = 'username' 

which 1 better access? get_cookie() or use $variable?

i have lot of code using get_cookie('cookie_name') (a codeigniter function) instead of using variables.

will increase performance if change access $variable instead of cookie?

cookies passed user's browser server every page load, whether use them or not.

there's going little performance difference.

what may want investigate whether data being stored in cookies (if it's lot) should there or not. many people have cookies turned off, want store nonessential information (and information doesn't have secure) in them.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -