RSS구독하기:SUBSCRIBE TO RSS FEED
즐겨찾기추가:ADD FAVORITE
글쓰기:POST
관리자:ADMINISTRATOR
'2008/02'에 해당되는 글 8
http://miniajax.com/  간단간단한 여러 가지 AJAX 응용 데모들이 쭉~

http://www.noupe.com/    이건 꼭  AJAX 응용이라기 보다는 UI..

http://www.hotscripts.com/Ajax/index.html

http://www.ajaxpath.com

http://www.dhtmlgoodies.com

http://ajaxpatterns.org/ 

http://firejune.com/index.php?stag=Prototype
2008/02/28 01:23 2008/02/28 01:23
이 글에는 트랙백을 보낼 수 없습니다
http://www.jlab.net/eclipse/eclipse%20project%20FAQ.htm#users_3

헬프...

애플리케이션(애플릿) 기본 실행 :
  네비게이터 창 > src 폴더의 해당 .java파일 선택 후 마우스 우측
  > Run As > Java Application
(Java Applet)
  하면,   (단축키 : Alt+Shift+X(eXecute) +J(Java Application)
  팁! : Alt(Alter)+Shift+X를 동시에 누른 후, 단축키 팝업이 나오면, J (Applet은 A)누름
  Console 창(애플릿은 애플릿 뷰어)에 결과가 나온다.
  참고 : htmlconverter (애플릿 사용시)

클래스 라이브러리와 소스를 붙이기:
 네비게이터 창 > 프로젝트 선택 > 마우스 우측 > Properties > 좌측 Java Build Path 선택
 > 우측 Libraries 탭선택 > 아래 리스트 보면, 각종 jar파일이 보인다. 클릭해보면
 Source attachment가 보인다. 소스 붙이길 원하는 부분의 Source attachment를 더블클릭
 > workspace, 파일, 폴더 형식으로http://www.jedit.org/ 에디터 추천(로딩이 느림)

Serializable 인터페이스를 구현한 클래스의 자신의 serialVersionUID를 명시적 선언
  예) private static final long serialVersionUID = 2008021001L;

브라우저 설정: 내부 브라우저에서 애플릿이 깨질 경우
   Windows > Preferences>General > Web Browser > Use external 체크 후 선택
   *.html 마우스 우측 > Open 혹은 Open With (> Web Browser)
   *.html 더블클릭하면, 이클립스 에디터로 열림
2008/02/24 19:26 2008/02/24 19:26
이 글에는 트랙백을 보낼 수 없습니다

[1](윈도우)


    - 내 네트워크 환경 아이콘을 오른쪽 마우스 클릭을 한뒤 맨밑에 속성창에 들어간다 ( 네트워크 연결창이 보일것이다 )


    - 그러면 로컬영역 / VMware Network Adapter VMnet1 / VMware Network Adapter VMnet8 이 보일것이다!!

       ( 그 외에 더있다면..난 모르겠다 ㅡ_ㅡ;;알아서 잘 찾아라 )


    - 로컬영역 오른쪽 마우스를 누른뒤 속성으로 들어간뒤 열려진 창의 탭 중에 고급으로 들어가라


    - 중간에 인터넷 공유 란에 다른 네트워크 사용자가 이 컴퓨터의 인터넷 연결을 통해 연결할수 있도록 허용을 체크해준다


    - 그러면 홈네트워킹 연결 창이 활성화가 될것이다. 그중  VMware Network Adapter VMnet8  를 선택하고 확인


    - VMware Network Adapter VMnet8  를 선택하고 오른쪽 마우스 클릭한뒤 속성창을 들어간다

   

    - 인터넷 프로토콜(TCP/IP) 속성창에 들어가서 IP 주소 할당을 자동으로 바꾼다 (GateWay 를 맞춰주는 방법또한있다-모르면비추)


[2](vmware)  - 안에 실행되는 리눅스를 가르키는게 아닌다! vmware 프로그램 자체를 말하는것이다!


    - 메뉴바에 보면 2번째에 Edit 탭이 있다. 그 안에 Virtual network settings 에 들어간다


    - 보통 6개의 탭이 있을텐데 그중 DHCP 를 선택하여 그중 VMnet8 의 subnet 주소를 적어놓는다 (이게 꼭필요하다)

       (원활한 설명을 위해 196.168.20.0 이라고 써있다는 가정하에  설명을 하겠다 )

       (아마도 다들 3번째 숫자가 같을수도 다를수도있다)


[3](linux)


    - vmware 안에 리눅스로 들어가서 netconfig 라는 명령어를 친다  ( 그뒤 ok 를 선택한다 )


    - 입력란이 나오는데 첫칸 체크는 하지말고 아래 순서대로 입력한다 (첫째칸은 DHCP 설정란이다. 체크하지말것!)


   - IP address : 196.168.20.3 (196.168.???.3 중 ??? 를 제외한 나머지는 나와 똑같이 쓴다)


   - Netmask : 255.255.255.0 (이것도 나와 똑같이 쓴다)


   - Defalut Gateway(IP) : 196.168.20.2(196.168.???.2 중 ??? 를 제외한 나머지는나와똑같이쓴다)


   - Primary nameserver : 168.126.63.1 (이것도 나와 똑같이 쓴다)


    - 그뒤 확인 누른뒤 나온뒤에 service network restart 를 입력한다 (그럼 잠깐 리눅스가 네트워크에 관한 부분만 재부팅을한다)


* 안되는분들!! 제발 부탁이건데 내가 시키는대로 따라서 해라!!! 자기 맘대로 뒤에 숫자 0,1 이런식으로 바꾸지말고!

   제발 부탁이다 위에 순서대로 꼭해라(하나라도 빼먹으면 실행안된다!!)



자 이제 실험해봐라 실험방법은 2가지이다

외부와 내부로 각각 ping 을날려서 성공하면 된다


외부 : ping www.yahoo.co.kr

내부 : ping 자신의 아이피주소 ( 자기 실제 컴퓨터 아이피 주소를 입력하랏! )


내외부 핑이 전부 잘 나가면 문제 없이 네트워크통신이 이루어진것이다


vmware 안의 linux 를 SecureCRT 라던가 Zterm 같은 SSH 접속 프로그램으로 접속할수 있다!


이때 접속할 IP 주소는 IP address : 196.168.20.3   이 IP 를 입력해서 할것!! (물론 3번째 숫자는 여러분과 다를수있다)

그리고!!! 데비안은 촉 웃겨서

network restart 안된다 ㅋㅋㅋ

할려면 !!!!!

# ifdown eth0
# editor /etc/network/interfaces  # tweak as you wish
# ifup eth0

위와같이 해야될것이다 ㅋㅋㅋㅋㅋㅋㅋㅋㅋ


=================================================================================================



그리고


vmware로 리눅스를 부팅시킨후,


vmware메뉴중 VM->install vmware-tool 선택


리눅스로 돌아와서 가상 시디롬을 마운트 시켜준다.


#mount /dev/cdrom /mnt/cdrom


마운트가 되었으면 /mnt/cdrom 아래에 있는 rpm을 설치하자.


우선, rpm을 리눅스로 복사한다.


그리고 설치...


#rpm -Uvh ~~~.rpm(이름이 생각이 안난다;;; rpm이 하나 밖에 없으니 그거 설치;)


설치가 다 되었으면 /usr/bin/vmware-config-tools.pl 실행


그럼 /mnt/hgfs 가 생성됬을 것이다.


다음과 같은 설정을 해주면 hgfs아래에 윈도우와 리눅스를 공유 할수있는 디렉토리가 생성


된다.


vmware의 메뉴에 VM->setting->option탭->shared Folder->add


다음과 같이 하면 공유할 디렉토리를 써주라는 창이 뜨는데 거기서 위에 칸에는 리눅스에서


윈도우를 공유할 디렉토리명을 써주고,아래 칸에는 윈도우에서 리눅스로 공유할 디렉토리명


을 써주면 된다.


그럼 /mnt/hgfs/공유디렉토리 가 생성된다.


2008/02/23 21:39 2008/02/23 21:39
이 글에는 트랙백을 보낼 수 없습니다
Linux  2008/02/23 21:12
1. apt시스템

apt 시스템은 는 패키지의 의존성에 기반하여 많은 양의 패키지를 관리하는 패키지 관리 시스템이다.
이는 저장소를 기반으로 패키지를 가져와 설치하고, 제거하며, 의존성을 보존한다.
apt 기반의 패키지 관리자들은 /etc/apt/sources.list 파일로부터 저장소 목록을 읽어온다.
이 파일의 구성 형식은 sources.list(5) manpage에서 확인 가능하다.



2. 패키지 관리자

- 데비안/우분투 에서는 Command 기반, NCurse 기반, XWindow 기반으로 각각 도구가 갖추어져 있다.

(1) Command 기반 : apt도구, aptitude (인자와 같이 사용할 경우)
(2) NCurse 기반 : aptitude, deselect
(3) XWindow 기반 : Synaptics

-----------------------------------------------------------------------------------------------------

(1) apt 도구  : Console 에서 명령어로 실행할 수 있습니다.

apt-cache               : APT의 바이너리 캐시 파일을 처리하고, 캐시파일에 정보를 질의하는 저수준 도구
apt-cdrom               : CDROM을 APT의 저장소 리스트로 추가하는 도구.
apt-config               : APT 설정 파일을 읽는 간단한 프로그램
apt-extracttemplates : 데비안 꾸러미에서 설정및 템플릿 정보를 뽑아내는 도구
apt-get              : 패키지를 다운로드하고 인스톨하는 간단한 인터페이스. 대부분 사용하는
                               명령어는 update와 install 이다.
apt-key                   : apt-get의 인증키 리스트를 추가, 삭제, 업데이트, 리스트 할 수 있다.
apt- sortpkgs  : 패키지 파일을 정렬하는 간단한 도구

- apt-get Command
update                  : 패키지의 리스트를 새로 받는다.
upgrade                : 업그레이드
install                   : 설치
remove                 : 제거
purge                   : 완전 제거
source                 : 소스를 다운로드 받는다.
build-dep             : 패키지를 위한 빌드 의존성을 구성한다.
dist-upgrade         :  배포판 업그레이드
dselect-upgrade    : dselect로 선택한 항목을 업그레이드한다.
clean                    : 다운 받았던 설치파일들을 지운다.
autoclean              : 오래된 다운받은 설치 파일을 지운다.
check                    : 의존성이 깨졌는지 확인한다.


----------------------------------------------------------------------------------------------------
(2) aptitude :  인자없이 사용할 경우

-> NCurse 기반의 인터페이스를 사용할 수 있게 된다.

첫화면)  : 패키지가 상태별로 분류되어 있다.
--- Upgradeable Packages     : 이미 설치된 패키지 중 새버전이 나와서 업그레이드 가능한 것
--- New Packages                 :  새로 올라온 패키지
--- Installed Packages           :  이미 설치된 패키지
--- Not Installed Packages      :  설치되지 않은 패키지
--- Obsolete and Locally Created Packages    : 곧 지워질 패키지
--- Virtual Packages                : 비슷한 기능을 지닌 패키지끼리 묶은 것.
--- Task                                : 특정 주제를 중심으로 패키지를 한데 묶은 것.


# 메뉴에서 키
F10: 메뉴     U: 업그레이드           g: (작업)실행      q: 종료


# 패키지 선택 창에서 키
/         :  패키지 검색 ( 한번에 나오지 않으므로 \(역슬래시)를 눌러서 나올때까지 계속 검사한다.)
ctrl-U   :  취소 기능



-  패키지 상태 용어
+ : install : 패키지 설치, 추가 선택
+ : upgrade : 업그레이드
- : remove : 삭제 (config 파일은 남긴다.)
_ : purge : 시스템 설정 파일까지 완전히 삭제
= : hold : 설치된 패키지를 건드리지 않도록 잠금
L : reinstall : 설치된 패키지를 지우지 않고, 덮어씀
g : (시작) : 선택한 패키지에 적용한 명령들을 적용한다.
ctrl-u : 취소 : 이전 상태로 되돌린다.


- 설정시 변경할 때 보이는 정보
<설치상태> <명령상태><직/간접 선택 상태> <패키지명> <용량> <현재버전> <새버전>

ex)
  i      u     A     libssl          0.97    0.98
-> 설치된 libssl을 의존성을 위해 0.97에서 0.98로 업그레이드.

----------------------------------------------------------------------------------------------------

(3) aptitude를 인자와 함께 사용하는 경우 - Command 인터페이스로 사용된다.

-> 내부적으로  apt-get을 이용하며, 사용법도 apt-get과 유사하다.
설치        - aptitude install 패키지명1 패키지명2 ....
삭제        - aptitude remove 패키지명1 패키지명2 ....
완전 삭제 - aptitude purge 패키지명1 패키지명2 ....
정보 보기 - aptitude show 패키지명1 패키지명2 ....
검색 하기 - aptitude search 패키지명1 패키지명2 ....
업그레이드          - aptitude upgrade
패키지 정보 갱신  - aptitude update

자동설치 표시 : aptitude markauto   패키지명1, 패키지명2 ...
자동설치 해제 : aptitude unmarkauto 패키지명1, 패키지명2 ...
상태잠금        : aptitude hold  패키지명1 패키지명2 ...     
상태잠금 해제 : aptitude unhold 패키지명1 패키지명2 ...


- 상세 검색
~n 검색어   검색어가 포함된 패키지
~i  : 설치된 패키지
~c : 지운 후에 설정파일이 /etc에 남아있는 패키지
~b : 의존성이 깨진 패키지
~a 작업 : 특정 작업이 계획된 패키지
~s 섹션 : 섹션에 속한 패키지


- 예제
ㄱ. 전체 패키지 목록
aptitude search ~n

ㄴ. sdl 라이브러리의 개발 버전(libsdl-dev)
aptitude search ~nsdl ~ndev

ㄷ. /etc 에 설정이 남아 있는 패키지 목록
aptitude search ~c

ㄹ. game 섹션에 포함된 패키지 목록보기
aptitude search ~s game

---------------------------------------------------------------------------------------------------

(4) dselect  - NCurse 기반의 인터페이스

-  english 위키 피디아에서 보면,  aptitude는 dselect의 다음 버전으로 고려하여 개발되어 졌으며,
console-apt를 사용한 것보다 좀더 객체 지향적인 디자인으로 실행되도록 만들어졌다고 나와 있다.
현재는 dselect는 backward의 융통성을 위하여 요구되어 진다.

- aptitude나 dselect 모두 libCurseW로 설계되어 있지 않으므로 UTF-8을 사용할 경우, 한글이 깨집니다.
   aptitude는 대신 한글 메뉴를 사용하지 않으므로, 이 경우는 aptitude를 사용하는 게 좋을 것입니다.

---------------------------------------------------------------------------------------------------

(5) synaptic : X 기반의 인터페이스
2008/02/23 21:12 2008/02/23 21:12
이 글에는 트랙백을 보낼 수 없습니다
HTML/FLEX  2008/02/20 14:02
 
플래시는 내부적으로 유니코드를 사용하며 기본적으로 모든 데이터를 유니코드(UTF-8, Universal Character Set Transformation Format, 8 bit)로 다룬다. 경우에 따라 URL을 다루거나 외부와 통신을 할 때 UTF-8가 아닌 운영체제가 사용하는 인코딩을 그대로 써야 할 경우가 있다. 예를 들어, 웹 서버가 기본적으로 UTF-8을 인코딩을 사용하지 않고, KSC5601(EUC-KR)을 사용하는 경우이다. 이런 호환성을 위해 플래시 MX에 System.useCodepage이 추가됐다.

System.useCodepage는 입출력에 유니코드를 쓸 것인지(false) 아니면 플래시 플레이어가 동작하고 있는 운영체제의 기본 인코딩 언어(로케일)을 사용할 것인지(true)를 결정한다. 한글 윈도우에서는 기본적인 인코딩은 KSC5601(EUC-KR)이다. 만일, 일본어 윈도우라면 기본 인코딩은 SJIS가 된다. 즉, SWF가 수행되는 환경의 인코딩을 사용하게 된다. 운영체제의 인코딩을 그대로 사용하려면, 보통 무비 타임 라인의 첫 프레임에 다음과 같은 코드를 넣어 준다.

System.useCodepage = true;

SWF는 내부적으로 UTF-8만 다루며 이것을 바꾸는 방법은 없다. 또한 코드페이지를 지정하는 방법도 없다. 따라서 useCodepage가 true인 경우는 SWF가 수행되는 운영체제의 코드페이지를 따라가며, false인 경우는 유니코드(UTF-8)을 사용하게 된다. 플래시가 내부적으로 사용하는 UTF-8은 유니코드의 각 문자를 1~4개의 바이트로 인코딩한 형태인데 다음과 같은 액션 스크립트를 통해 쉽게 확인할 수 있다.

System.useCodePage= false; // 코드페이지 사용 안함(UTF-8)
trace(escape("abc가나다"));
System.useCodePage= true; // 코드페이지 사용(EUC-KR)
trace(escape("abc가나다"));

이 코드는 다음과 같이 출력된다. escape는 URL에 사용하기 위해 %가 붙은 형태로 인코딩하는 함수이다. 이 코드는 다음과 같이 출력된다.

abc%EA%B0%80%EB%82%98%EB%8B%A4
abc%B0%A1%B3%AA%B4%D9

UTF-8인 경우, 한글의 한 글자가 3개의 바이트로 인코딩되었음을 알 수 있다. useCodePage가 true인 경우는 한글 한 글자가 2개의 바이트가 된다.
2008/02/20 14:02 2008/02/20 14:02
이 글에는 트랙백을 보낼 수 없습니다

1. 테이블 생성
CREATE TABLE `TranTest` (
`num` int(11) NOT NULL auto_increment,
`col01` varchar(32) default NULL,
PRIMARY KEY (`num`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `TranTest2` (
`num` int(11) NOT NULL auto_increment,
`col01` varchar(32) default NULL,
PRIMARY KEY (`num`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

2. 입력 용 프로시저 생성
CREATE PROCEDURE `Prc_TranTest_Input`
(
in in_col01 varchar(32)
)
BEGIN
INSERT INTO TranTest SET col01 = in_col01;
END;

3. SELECT 용 프로시저 생성
CREATE PROCEDURE `Prc_TranTest_Select`
(
in in_col01 varchar(32)
)
BEGIN
SELECT num, col01 FROM TranTest WHERE col01 like concat(in_col01, ‘%’) ;
END;

4. Transaction 용 프로시저 생성
CREATE PROCEDURE `Prc_TranTest_InError`
(
)
NOT DETERMINISTIC
SQL SECURITY DEFINER
COMMENT ”
BEGIN
DECLARE dbErr int default 0;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET dbErr = -1;
START TRANSACTION;
INSERT INTO TranTest SET col01 = ‘1234′;
INSERT INTO TranTest2 SET col012 = ‘1234′; //일부러 에러값을 내기위해 칼럼명을 다르게 적습니다.
IF dbErr < 0 THEN
ROLLBACK;
ELSE
COMMIT;
END IF;
END;

5. PHP 를 이용하여 SELECT 및 입력하기
$mysqli = new mysqli(”localhost”, “USERID”, “USERPW”, “USERDB”);
if (mysqli_connect_error()) {
printf(”Connect Failed : %s\n”, mysqli_connect_error());
exit;
}
$mysqli->query(”set names utf8″);

//SELECT
if($qry = $mysqli->query(”Call Prc_TranTest_Select(’123′)”)) {
$rs = $qry->fetch_object();
echo $rs->col01;
}

//INSERT TranTest;
$mysqli->query(”Call Prc_TranTest_InError()”);

2008/02/18 16:17 2008/02/18 16:17
이 글에는 트랙백을 보낼 수 없습니다

사용자 삽입 이미지

맞을꺼야 횽의 생일 선물 이었음 ..
일단 너무 고마워서 ㅠ.ㅠ; 열어보니

사용자 삽입 이미지


ㅎㄷㄷ
선물 준거라고 ~~ 자기 명함 한장 놔두고
벗겨보니 ..

사용자 삽입 이미지



먼가 보였다 ;; 저건 설마
초딩때 친구들 생일 파티떄 선물 과 같이 첨부되어있는 생일 축하 쪽지 ?
보니깐 ..

사용자 삽입 이미지


ㅎㄷㄷ ;;; 고마워횽 ㅠㅠ;;

사용자 삽입 이미지


마지막으로 지금 잘쓰고 있다 한영이 좀 짱나지만 괜찮다 ^^


다음은 효성이의 책선물 ~.~a

사용자 삽입 이미지

오 실용 주의 플그래머 ;;;;;

생일 카드 내용이....

사용자 삽입 이미지


상병신..이네요.
2008/02/14 23:44 2008/02/14 23:44
이 글에는 트랙백을 보낼 수 없습니다
HTML  2008/02/06 13:45
P3P의 압축정책 Spec
개인 정보 태그 압축 토큰
<contact-and-other/> CAO
<pseudo-analysis/> PSA
<contact required="opt-in"/> CONi
<other-recipient/> OTR
<ours/> OUR
<demographic/> DEM
<online/> ONL

범주 압축 토큰 설명
<physical/> PHY 연락처 또는 위치 정보
<online/> ONL 인터넷 상의 연락처 또는 위치 정보(예: 전자 메일 주소)
<government/> GOV 정부에서 발급한 ID(예: 사회 보장 번호)
<financial/> FIN 개별 재무 정보

용도 압축 토큰 설명
<customization/> CUS 사용자에 의해 명시적으로 요청된 사이트 수정
<individual-analysis/> IVA 개별 사용자와 관련될 수 있는 분석
<individual-decision/> IVD 사용자 기록에 기초한 동작 수행
<contact/> CON 개별 사용자에게 연락하는 데 사용할 수 있는 정보
<telemarketing/> TEL 전화 판촉에 사용할 수 있는 정보
<other-purposes/> OTP 다른 P3P 용도 이외의 기타 용도

수신인 압축 토큰 설명
<same/> SAM 일관된 관례에 따라 고유한 목적에 데이터를 사용하는 정식 항목
<delivery/> DEL 주어진 용도 이외에 목적에 데이터를 사용할 수 있는 배달 서비스를 수행하는 정식 항목
<other-recipient/> OTR 공급자에게 책임이 있지만 알려지지 않은 방법으로 데이터를 사용할 수 있는 항목
<unrelated/> UNR 공급자에게 알려지지 않은 방법으로 데이터를 사용하는 항목
<public/> PUB 공개 포럼

여기에 안나온것들은

http://www.w3.org/TR/P3P/ 이곳에서 살펴봐라.

또 영어라고 울렁증 걸릴텐데 -_- 제가 찾아보니..

4.2 Compact Policy Vocabulary

여기부분을 봐라 ㅡㅡ 쫌 !!

쫌 알고 쓰자 -_-;;;

그리고 이건 덤으로 ...

The Situation

The other day I came across a weird security problem at work: While a system to customize a site's appearance worked fine in Firefox, storing the state kept failing in IE. Now, I'm not a big fan of these browser discussions and don't mind using either, but that error made me curious. I quickly found out that it was down to the company's security standard, which defaulted IE's privacy level to high-medium. This level doesn't allow third-party cookies for permanent storage, and as the whole site was running in a Frameset for a couple of days (thank you, domain-hogging cheapie-host), the cookies used were rightly considered third party.

They are allowed to be stored under this setting, though, when they come with a P3P (Platform for Privacy Preferences) policy. Microsoft offers a nice overview to what this is, but leaves you pretty much in the dark of how you actually get from A (Problem) to B (Solution). P3Ptoolbox.org, a website dedicated to P3P offers an all-embracing guide, but the sheer amount is more off-putting than encouraging.

What Is P3P?

P3P is a protocol designed to offer an "automated way for users to gain more control over the use of personal information on Web sites they visit", states the W3C. Policies are something that is used quite frequently, in the Flash and Java (J2EE) World, usually describing a set of permissions granted or revoked. P3P is an XML based policy that describes the scope or the way how the data in cookies is used. It consists of four logical parts:

  • a written, and as they like to state "human readable" policy, as html-file is recommended as the easiest starting point for it all. But, hooray, if you rather track down cookie operations in your code, the policy editor will generate one for you, which you can then amend to your needs.
  • The policy editor helps you create the full XML privacy policy
  • The Policy-Reference File, again as XML, which is stored in a "well-known location", links to the privacy policy.
  • The compact policy(a string of 3-letter-abbrevations), which is sent in the header of the page containing the cookie-related action.

How can I build it?

If you look into tools for generating P3P policies, you'll find yourself in a land of darkness and badly designed websites with dollar signs. But there's light at the end of the tunnel: The IBM P3P Editor is free, being an executable jar it's crossplatform, and if you know what you're doing, it's really easy. So what do you have to do?

  1. Do your homework: the first step is, and the P3Ptools site isn't wrong with it, a thorough preparation. Does the company running the website already have a privacy policy? Does it cover all cookie-related actions as well? If not, "Where do you store and read out cookies?", and "What's stored in them?" are the first key questions to ask. Ideally you know it beforehand, if not, an extended search over the usual cookie-dealing functions should refresh your memory.
  2. What to do with the data? Who will be dealing with it? Once you have figured out what it is you'll need to ask yourself or, even better, your client, if they are planning to use the requested data, e.g. for stats on returning users or to find out about preferred customizations and the like. This should be (again ideally) honest, or alternatively passed by a legal department that does the juggling of the words.
  3. Fire it up. The IBM P3P policy editor luckily generates XML and P3P strings as well as a good skeleton for the written privacy policy. All you have to do is
    • To categorise your cookies into groups and usage.
    • Connect them to their purpose
    • Add information about dispute and contact possibilities
    • Generate policy
    • Deploy: A great word which took me a while to understand, back at university. In this case, all it means is to take the generated xml and html and drop it in a folder.

An example

Let's say we set and read a cookie on the homepage that stores a unique ID for tracking reasons and retrieves preferences from the db on how the site is displayed (font size and regular/high-contrast layout, for example).

Open up the P3P editor, choose "create a blank policy", and you'll find a well categorized list of elements on the left, and an empty tree on the right.

IBM P3P Editor screenshot 1

Locate and drag the data elements matching your purpose from the list into the "new group" on the right. In our case that's:

Broad Categories --> unique identifier and
Dynamic Data --> http cookie

You can edit the group name, and you'll probably want to do it in real life situations that are more complex - in order to find grouped entries easier later on.

When you do so, you are also asked to put down an explanation to why the data is requested and you have to decide if "there is no reasonable way to link this data to the visitor's real-world identity." (check the help button). As users don't register on my site, they will be unique by identifier, but I won't be able to find out who they really are. The display data is anonymous anyway, so, tick the box here as well. Describe the reasons then on to the next step.

Make your way through the tabs, I will check "Site customisation" and "Anonymous user tracking", I offer an opt-out possibility for the site customisation, and uncheck pseudonymous decision-making, as I’m not tracking that. Recipient is just me, and as Retention I choose indefinitely.

To the right of the tabs in the lower part of the window is a properties button, click that to add all necessary data for the website, starting with a full contact information of the person/organisation responsible for the site.

Click on the next tab to enter a generic name for the policy and add an opt-out url (essentially a page where you can choose to get all cookies from your site deleted).

Make sure your language selection is the right one and add the url for your privacy policy on your website.

The Access-tab wants you to indicate what personal data the user can view to doublecheck what's stored on your site. In my case: no identified data is collected.

Next, let's eliminate that dispute warning: go to "Assurances", and add a dispute. I call it "all disputes" chose customer service as dispute remedy for "all disputes", with a link to contact-us, to reach the customer service.

Lastly, in the global properties, set the expiry date. I chose the same as the cookies lifetime, or up to a date when the cookie situation, and therefore the privacy policy, changes.

The easiest way to get rid of the must-haves is to eliminate one error after the next. Click the error tab to see them. If you have any other errors, fix them accordingly... it's most probably in your data group, or it’s a conflict between your data elements, the group and global properties.

All done? I had to add a category to my HTTP cookie. Now it looks like this:

Save it, and go to the final step: deploy your data. For that, you'll need to generate a reference file first. Here's one that fits my example - it directs to the P3P file in all cases (include \*).

<META xmlns="http://www.w3.org/2000/12/p3pv1">
 <POLICY-REFERENCES>
    <POLICY-REF about="testsite_com.p3p">
       <INCLUDE>\*</INCLUDE>
       <COOKIE-INCLUDE name="*" value="*" domain="*" path="*"/>
    </POLICY-REF>
 </POLICY-REFERENCES>
</META>

All you have to do now, is:

  • Save the P3P reference file in a folder called w3c in the webroot, as /w3c/p3p.xml. Feel free to look at my example reference.
  • Save the P3P. You can see from how I set up the reference file that I chose to store it in the same folder, which is the easiest and most common thing. Here's my example p3p policy for download
  • Every time you interact with the cookie, send the created header first. Below is an overview of how to do it for my example, taken directly from the privacy council.
  • Finally: Take a look at it (in IE: view-->privacy report).
P3P compact policy implementations
Method Code
HTML <meta http-equiv="P3P" content="CP='NOI DSP NID TAIo PSAa OUR IND UNI OTC TST'">
PHP Header("P3P: CP='NOI DSP NID TAIo PSAa OUR IND UNI OTC TST'")
ASP Response.AddHeader "P3P","CP='NOI DSP NID TAIo PSAa OUR IND UNI OTC TST'"
JSP Response.setHeader("P3P","CP='NOI DSP NID TAIo PSAa OUR IND UNI OTC TST'")
ColdFusion <cfheader name="P3P" value="CP='NOI DSP NID TAIo PSAa OUR IND UNI OTC TST'" />

Conclusion

Congratulations, you made through this dry and rocky path of an article, or alternatively you found the scrollbar overly useful. I've had my doubts while writing this, about how complex it should be, and decided to go for an overview with a simple A-Z example, as my key problem was piecing it together initially.

P3P doesn't end here though - there are many more possibilities, from setting up different policies for different parts of a website, to getting deeper into the personal data aspect (there's quite a difference in cookie handling with P3P when personal data is involved), to taking a closer look into the client side and the possibilities that P3P offers, which mostly aren't quite built into browsers yet.

The idea of P3P is a good one, but it's flawed, as it's so far based on honesty. If I used information differently than I stated in my P3P policy, how would the user ever know? If developers use half-hearted workarounds by simply adding a non-offensive P3P header, why would the user trust P3P? These are the first things that you'll ask yourself while spending time on this, but there's more elaborated critizism: the Electronic Privacy Information Center has assessed P3P and is not happy at all with it. So why do it? Given you do use cookies, 3 reasons come to mind, and they seem oddly close to web standards (looking forward to the comments):

  • Because you have to: I don't use cookies very much, maybe a couple of projects a year. But if I do and it doesn't work for a group of users or, even worse (*gasp*) the client, heck, I gotta make it work.
  • Because you would rather solve problems than work around them: I never like grey areas in projects, identified ones or the ones that are brushed off. The fix-it-now-research-it-later approach usually ends in not researching it at all, and next time round you're none the smarter.
  • Because it makes a better website: This is the moral high ground for today, but think about it: the web standards movement is something that had to happen sooner or later. Cookies aren't used as much as in the olden days, but as the basics are set and can be extended, any improvement in their handling should improve users trust in using personal data on the internet, with reasonable resonance in the future.

2008/02/06 13:45 2008/02/06 13:45
이 글에는 트랙백을 보낼 수 없습니다
웅쓰:웅자의 상상플러스
웅자의 상상플러스
전체 (379)
게임 (5)
영화 (2)
기타 (23)
맛집 (5)
영어 (2)
대수학 (3)
형태소 (5)
Hacking (9)
Linux (112)
HTML (48)
Application_developing (48)
Web_developing (102)
Window (11)
«   2008/02   »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29  
  1. 2016/01 (1)
  2. 2015/12 (3)
  3. 2015/10 (3)
  4. 2015/03 (2)
  5. 2015/01 (4)