Example Code:
<%
Response.Buffer=True
data=Request("data0")
if data ="" then data=Empty
Response.Cookies("data1")=data
Response.Cookies("data1").Expires=#July 1,2006#
%>
go to an other page the cookes will
keep in your computer
[ this can be response.redirect "http://newURL" ]
[ also can be action="http://newURL" ]
[ as long as you use Request.Cookies("____") ]
[ tips: same cookies may do exist
between different domains ]
<%
data1=Request.Cookies("data1")
%>
----------------------------------
<%
' txt is a from a submit form data
txt =Request("txt" )
response.cookies("txt")=txt
txt=request.cookies("txt")
%>
常用於會員的登錄與登出
使用技巧:
建立網路餅乾前建議加上
Response.Buffer=True
來讓將建立的網路餅乾名稱的內容重設
比如在Login登錄會員時可用此方法
以免使用到前者的資料
當然同理可推:Logout登出會員時
也可使用此技術讓網路餅乾完全融化
-----網路安全-----
以上技術看似簡單,但其重要性也是
牽連到網路安全,處理不好就經常成為
網路漏洞....特別是在網咖圖書館公共室
辦公室會發生,因為多人共同用電腦的機會大
...以知名的大網站...G.Y. 等筆主都曾遇過
網路安全::網路餅乾也可成為一個網路大漏洞
網路餅乾:乾坤大挪移...偷天換日
就算你的私人電腦餅乾都有可能被他人得手
|