java - Getting cookie value or getting data from DB? -
which of these operations require more time , resources? getting cookie value or getting data db?
they both serve different purpose. cookies used store preferences , disposable in sense if aren't available (like client deleted them) preferences switch defaults.
database on other hand store data should persist through-out application's life. example, user login data. can't save cookies security reasons may lose them time.
cookies can save text whereas can practically save in database binary objects.
any preferences saved cookies take effect if user uses same browser cookies stored on. so, databases more suited preferences should mobile.
Comments
Post a Comment