Privacy policy and cookie blocking in the browser

Asked

Viewed 325 times

2

Good morning, I put a system to remember users in my program in php, I used cookies for this, as I found in Google an explanation about them, but I came across the following: IE and some browsers if not all today, block cookies that do not have a privacy policy. I searched about it and found nothing but how to enable cookies in your browser.

What I would like to know and if there is how I make the browser accept cookies without needing the user to go in settings to enable such cookie or if there is another way to make the user information is saved in the browser to return later and not having to type in the password every time, or if there is another way to remember without using a cookie.

grateful in advance.

  • Saving a cookie is optional, take into account security factors that imply this choice. If you could manipulate the setting of cookies that the user made, it would be a terrible browser failure.

  • but how would I get back to the browser, after I close it, still connected on the system? since not every browser accepts localstorage even less ie (I think)

1 answer

1


The COOKIE is an interesting mechanism but as mentioned can be blocked by the browser. This is a feature and can do nothing to change.

In order to maintain navigation data Sessões is the alternative. For your better understanding would say:

COOKIE can be adjusted for a long life time, which means the data stored in a cookie may be stored for months or even years. Cookies, are stored in the customer, work smoothly and are an important mechanism when you work especially with a cluster of web servers.

IMPORTANT: it is not supposed to contain vital information and it is good practice that the information contained therein is digitally signed.

The sessions are stored on the server side, which means that clients do not have access to the information that is stored on them - this is particularly important if you store shopping carts or other information that you do not want your visitors to manually edit as may happen in COOKIES. The data of the session, being stored on the server side, do not need to be transmitted on each page access; only need an ID for each access and the data is loaded from the "local archive".

I mentioned a local file and if read I always referred to the expression "stored on the server side", but it was intentional because the default PHP engine delivers the ability to save session data to files on the server. However, it is important to mention that the concept contemplates the possibility of implementing its own session management mechanism, such as in a database. Useful in environment of cluster of web servers.

NOTE: Finally, sessions can be of any size you want, because they are kept on your server, while many browsers have a limit for cookies, in addition to being able to block them.

  • I understand, but instead of a cookie, how would I store vital information within the customer’s browser? since localstorage does not apply to every browser, which made me have to create a gambiarra, simply I select the cookie, check if the cookie is set, if not, Seto a localstorage, I check if the location Storage this set, if not, I use js.cookie to set a cookie with js, check if the cookie is set, if not, what can I do? there is another way or way to do this? insert information that never erases in the client’s browser?

  • the problem of using js.cookie is that it will have one more download to do on the customer’s mobile, ie more weight for the site, I want to avoid unnecessary downloads for the customer, mainly to do a little thing, even if I call it only when the PHP variable is triggered.

  • 1

    @flourigh as I said the cookie has limitations nothing can do.. I’ve given you an alternative....

  • in case you say, use Session? but this will delete whenever you close the browser, imposing on the customer, enter the information again? not being able to save the information forever, I am correct in understanding so?

  • 1

    @flourigh my dear... you haven’t even voted on my answer yet! To answer your question... the world is not perfect and technology also has its limitations. I do not know your level of knowledge but investigate a little about JWT , Sessions and cookies and you will surely find an answer to your problem. What you describe is something that is implicit in the operation of this type of mechanism. If you want more serious help... I can help!

  • grateful, I am learning, and I have come across the no use of cookies by modern browsers

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.