Qhov Sib Txawv Ntawm Tau Txais thiab Tshaj Tawm

Cov txheej txheem:

Qhov Sib Txawv Ntawm Tau Txais thiab Tshaj Tawm
Qhov Sib Txawv Ntawm Tau Txais thiab Tshaj Tawm

Video: Qhov Sib Txawv Ntawm Tau Txais thiab Tshaj Tawm

Video: Qhov Sib Txawv Ntawm Tau Txais thiab Tshaj Tawm
Video: Qhov txawv ntawm Zaj Tshoob and Txiv Xaiv 2024, Kaum ib hlis
Anonim

Tau vs Post

Yog tias daim ntawv cov ntaub ntawv raug encoded nrog URL uas tau thov los ntawm tus neeg rau zaub mov, nws raug hu ua Get, whereas, yog tias daim ntawv cov ntaub ntawv raug xa mus rau hauv lub cev ntawm cov lus, nws yog hu ua Post. Thaum koj tsis muaj ntaub ntawv ntxiv nrog rau qhov URL, daim foos no raug siv.

Cov nplooj ntawv HTML uas peb nyeem hauv peb lub vev xaib yog qhov zoo li qub. Cov no yog cov ntaub ntawv zoo li qub thiab thaum peb cuam tshuam nrog nplooj ntawv web, koj yuav tsum xa cov ntaub ntawv rov qab mus rau sever hauv ib qho twg. Qhov no ua tiav nrog kev siv cov ntawv thiab muaj ob txoj hauv kev uas koj tuaj yeem siv daim ntawv; Tau thiab Post. Los ntawm kev siv daim ntawv, cov ntaub ntawv yog encoded xa rov qab mus rau lub server. Tam sim no, qhov txawv ntawm Get thiab Post yog dab tsi?

Yog tias cov ntaub ntawv raug encoded nrog URL uas tau thov los ntawm lub server, nws raug hu ua Tau raws li HTML specifications. Daim ntawv cov ntaub ntawv raug cais tawm ntawm URL los ntawm daim ntawv thov uas tau txais cov ntaub ntawv. Tom qab txheeb xyuas qhov URL thiab daim ntawv cov ntaub ntawv, nws yog siv los ua cov lus nug. Yog tias koj pom tus Tsov tus tw ntev ntawm qhov tseem ceeb thiab qhov sib txawv khi rau qhov kawg ntawm lub vev xaib URL, koj tuaj yeem nkag siab tias koj tab tom cuam tshuam nrog Cov Lus Nug. Nrog rau tag nrho cov lus nug cov ntaub ntawv, koj tuaj yeem bookmark tag nrho URL yog tias koj ua haujlwm nrog Tau txais kev thov. Yog li koj tuaj yeem pom cov txiaj ntsig ntawm cov lus nug thaum koj qhib lub bookmark dua.

Yog tias cov ntaub ntawv xa mus rau hauv lub cev ntawm cov lus, nws raug hu ua Post. Thaum koj tsis muaj cov ntaub ntawv ntxiv nrog rau qhov URL, daim ntawv no raug siv. Post tsis tuaj yeem raug cached hauv browser keeb kwm ntawm tus neeg siv thaum piv rau Get. Qhov xwm txheej no tshwm sim qhov xwm txheej uas nplooj ntawv yuav tsum rov xa cov ntaub ntawv mus rau lub vev xaib server. Hmo ntuj koj tau ntsib qhov xwm txheej no ntau zaus.

Nws feem ntau pom zoo tias koj yuav tsum siv Get thaum koj tsim ib daim ntawv thiab tsuas yog hauv qee qhov xwm txheej koj yuav tsum siv Post. Yog tias ib qho ntawm qhov sib txawv ntawm qhov browser poob lossis yog tias nws ua rau URL ntev dhau lawm, koj tuaj yeem siv Post daim ntawv. Muaj ntau qhov zoo ntawm kev siv Post raws li nws yog daim ntawv zoo dua uas koj tuaj yeem siv yog tias koj xav tau ua kom lub luag haujlwm ntawm koj daim ntawv thov zais lossis pom tsawg dua rau lwm tus neeg siv. Tab sis qhov no tsis yog kev cog lus ntawm kev ruaj ntseg vim leej twg tuaj yeem nkag siab txog qhov hloov pauv uas koj siv los ntawm qhov chaws ntawm koj daim ntawv thov.

Qhov sib txawv loj ntawm Tau Txais thiab Tshaj Tawm tuaj yeem piav qhia raws li:

Visibility

Qhov no yog qhov sib txawv ntawm Txoj Kev Tau Txais thiab Tshaj Tawm. Daim ntawv thov tau ntxiv rau qhov URL raws li tau muab cais los ntawm cov lus nug. Qhov kev thov Post tsis tuaj yeem pom vim nws tau ntim hauv HTTP lub cev.

Kev ua haujlwm

Nws yog ib qho yooj yim los tsim kom tau txais kev thov thiab nws nrawm dua li Post thov. Tab sis Post thov yuav siv sij hawm nyob rau hauv cov txheej txheem encapsulation.

Data type

Vim tias tau txais kev thov raug xa los ntawm URL, nws tuaj yeem yog cov ntawv nyeem nkaus xwb. Tab sis tsis muaj kev txwv zoo li no nyob rau hauv rooj plaub ntawm Post thiab nws tuaj yeem nqa ob qho tib si thiab cov ntaub ntawv.

Data set

"Enctype" tus cwj pwm nrog tus nqi tuaj yeem siv nrog Post thov thaum tau txais kev thov tsuas yog siv cov cim ASCII xwb.

Yog tias daim ntawv ua rau tsis muaj kev cuam tshuam, siv txoj kev "GET" tuaj yeem siv. Feem ntau ntawm cov databases zoo tagnrho rau kev siv GET method.

Pom zoo: