9-3 ???術細節

`w Cookie ޳Nh[HAHPǹ Cookie `@BAѡC

Cookie O Netscape qoiXӡADnتOnJA HTTP protocal uLAv]Stateless^SʡCyܻACookie تNOnOϥΪ̤ebW欰AHKϥΪ̦^P@ӺɡAǬi`C

Hint
ҿתuStatelessvAObBzC@ӥΤeӪ RequestAAèSeO_ Request]Log ɮװ~^A]AΤݶis欰MlܡC

Netscape qҳ]p CookieAOg HTTP YT]Header^ӶǰeApUG

|ҨӻA@ӼзǪ HTTP Response Header pUG
HTTP/1.0 200 OK
Date: Tuesday, 09-Nov-99 20:58:25 GMT
Server: Open-Market-Secure-WebServer/2.0.5.RC0
MIME-version: 1.0
Security-Scheme: S-HTTP/1.1
Set-Cookie: USER=4wOm1zd2VlbmV5MTk5OQ; 
     Path=/; Domain=.site.com; expires=Wed, 
	 01-Jan-2031 01:01:01 GMT
bWҤAuSet-Cookie:vwFnUܨϥΪ̺ݪ Cookie C

@bϥsAϥΪ̬OݤoǪYTAYnݨoǸTAiHϥ telnetAҦpAЦb DOS JUCrG

telnet neural.cs.nthu.edu.tw 80 U Enter AۿJUCrG HEAD /jang/ HTTP/1.0 ]AiݤJrAOoä|vTGC^䤤 HEADANuYTCJAOonu⦸vEnter ANiHo@sbܧڪɡAAҦ^ǪYTG HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Date: Mon, 30 Oct 2006 05:54:00 GMT Connection: Keep-Alive Content-Length: 7179 Content-Type: text/html Set-Cookie: ASPSESSIONIDQCBCCDTA=AKHDJFHCGGDPDMNAHONKMPEN; path=/ Cache-control: private pGnouWeb{]pB޳NPΡvTAiHJUCrG GET /jang/books/JavaScript/ HTTP/1.0 䤤 GETANTCU⦸ Enter AǦ^TpUG Server: Microsoft-IIS/5.0 Date: Mon, 30 Oct 2006 05:56:31 GMT Connection: Keep-Alive Content-Length: 8967 Content-Type: text/html Set-Cookie: ASPSESSIONIDQCBCCDTA=DLHDJFHCAGGLFCEOJCIBEJLN; path=/ Cache-control: private <html> <head> <title>JavaScript {]pP</title> <LINK TYPE="text/css" REL="stylesheet" HREF="common/my.css"> </head> <body> <font face="helvetica,arial"> <h2 align=center class=txtH1>JavaScript {]pP</h2> <h3 align=center class=txtH2>by <a href="http://www.cs.nthu.edu.tw/~jang">iP </a></h3> <hr> ... ڭ̥iHN Cookie ]wⳡG
  1. ѦAΤi]wG Cookie TNObѦA^ǪYApeҭzCo譱Ӹ`Aڭ̷|b ASP `[HC
  2. ѥΤݪ JavaScript i]wGOgѥΤݪ JavaScript Ӷi]wAШĤ@`βĤG`CC
t~AsAɡA]|a۪YTA٬ HTTP Requst HeaderAo]|]tP Cookie TAҥHAݤ]iHߨ誾DP Cookie TAҦpeXƩʶRءAC]ڭ̥iH Cookie @`pUG ԲӬy{iuexample/Cookie]wy{.pptvC

Example]Cookie]wy{.ppt^G

Hint
Request ResponseA|b ASP `i满C


JavaScript {]pPΡGΩΤ