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
Post a Comment