Kev siv Session hauv web application yog dab tsi?
Kev siv Session hauv web application yog dab tsi?

Video: Kev siv Session hauv web application yog dab tsi?

Video: Kev siv Session hauv web application yog dab tsi?
Video: Qhia saib yus tus hlub lub xov tooj seb nws kov txog dab tsi thaum yus nyob deb 2024, Kaum ib hlis
Anonim

A kev sib tham tuaj yeem txhais tau tias yog server-sab cia ntawm cov ntaub ntawv uas xav tau kom pheej mus thoob plaws tus neeg siv kev cuam tshuam nrog web site lub web thov . Tshwj tsis yog khaws cia loj thiab tas li hloov cov ntaub ntawv viacookies hauv tus neeg siv tus browser, tsuas yog tus cim tshwj xeeb yog khaws cia rau tus neeg siv khoom.

Tsis tas li ntawd, kev sib kho yog dab tsi thiab vim li cas peb siv nws?

Kev sib tham yog ib txoj hauv kev yooj yim los khaws cov ntaub ntawv rau ib tus neeg siv tawm tsam ib qho tshwj xeeb kev sib tham ID. Qhov no tuaj yeem yog siv kom txuas ntxiv lub xeev cov ntaub ntawv ntawm nplooj ntawv thov. Kev sib tham IDs feem ntau xa mus rau qhov browser ntawm kev sib tham ncuav qab zib thiab tus ID yog siv mus retrieveexisting kev sib tham cov ntaub ntawv.

Qhov thib ob, qhov kev sib kho yog khaws cia nyob qhov twg? Cov kev sib tham tuaj yeem yog khaws cia ntawm lub server, lossis ntawm tus neeg siv khoom. Yog tias nws nyob ntawm tus neeg siv khoom, nws yuav yog khaws cia los ntawm tus browser, feem ntau yuav nyob rau hauv ncuav qab zib thiab yog hais tias nws yog khaws cia ntawm lub server, lub kev sib tham ids yog tsim thiab tswj los ntawm lub server.

Ib yam li ntawd, cov ncuav qab zib thiab ntu yog dab tsi?

Khob noom cookie thiab Sessions yog siv los khaws cov ntaub ntawv. ncuav qab zib tsuas yog khaws cia rau ntawm tus neeg siv khoom-sidemachine, thaum kev sib tham tau khaws cia rau ntawm tus neeg siv khoom thiab asa server. Kev sib tham . A kev sib tham tsim ib cov ntaub ntawv nyob rau hauv ib ntus directory ntawm tus neeg rau zaub mov uas sau npe kev sib tham variables thiab lawv cov nqi yog khaws cia.

Vim li cas thiaj yuav tsum muaj kev sib tham?

Thaum muaj ib qho kev thov txuas ntxiv thiab cov lus teb los ntawm tib tus neeg siv khoom rau aserver, tus neeg rau zaub mov tsis tuaj yeem txheeb xyuas los ntawm tus neeg siv khoom nws tau txais kev thov. Vim HTTP yog ib txoj cai tsis muaj xeev. Thaum muaj ib tug xav tau los tuav lub xeev kev sib tham, kev sib tham taug qab yog xav tau.

Pom zoo: