Can Session be used when Cookie is disabled?

Source: Internet
Author: User
Cookie and Session are generally considered to be two independent items. Session adopts the server-side persistence scheme, while Cookie adopts the client-side persistence scheme. There are two types of cookies: session... Cookie and Session.

It is generally considered to be two independent things. Session adopts the server-side persistence scheme, while Cookie adopts the client-side persistence scheme. There are two types of cookies: session cookies, which are lost when the browser is closed...


Cookie and Session are generally considered to be two independent items. Session adopts the server-side persistence scheme, while Cookie adopts the client-side persistence scheme.
There are two types of cookies: session cookies, which will be lost when the browser is closed, and persistent cookies, which we usually call cookies, generally, sessions on the server end use seesion cookies to interact with clients.

For php, what should we do if the client closes the cookie?
  • Set "session. use_trans_sid = 1" in the php. ini configuration file, or enable the "-- enable-trans-sid" option during compilation, so that PHP can automatically pass the Session ID across pages.

  • Manually pass Session IDs through URL values and hidden forms.

  • Save the Session ID in the form of files and databases, and manually call the Session ID during the cross-page process.

The above is the details about whether the Session can be used when the Cookie is disabled. For more information, see other related articles in the first PHP community!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.