2023年3月
      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 30 31  
無料ブログはココログ

 

« 今週届いた本 | トップページ | ニコニコ動画のセッション用Cookieについてメモ »

2011年9月 7日 (水)

WebブラウザのCookie メモ

Opera(Ver11.51:2011/9/7現在最新)のCookieをJavaで読み込むべくプログラムを作っているわけだが

  • Cookieは、<APPDATA>\Opera\Opera\profile\cookies4.dat で管理しているのだけれど、Operaが立ち上がっている間はOnMemoryで管理しているみたい。直ぐには反映されない模様。(更新日時と内容読み込みにより、そう思ったダニ)
    確実に反映されるのは、Operaを終了した時。
  • Ashula.infoさん 「cookies4.dat」(←このリンク先消されている。OperaのCookieの構造の参考はO4FEくらいしか見当たらない)に書かれている構造ではチト足りないような・・・。
    Cookiesの終了にも[Domain end of flag]の0x84がある。←つまりDomainを示すTagID:0x01の個数より1つ多くTagID:0x84が出てくる。
    ニコニコ動画のuser_sessionを格納しているDomain:nicovideo.jpを例にとると

    [Domain "jp" record] TagID:0x01
      [Path component terminator] TagID:0x85 (Page開始TagID:0x02が無くてもPage終了TagID:0x85はある)
    [Domain "nicovideo" record] TagID:0x01
       [cookies] TagID:0x03
        [cookie recode :name] TagID:0x10 "user_session"
        [cookie recode :value] TagID:0x11 "xxxxxxxxxxxx"
       [Path component terminator] TagID:0x85
       [end of domain flag] TagID:0x84
    [end of domain flag ("nicovideo")] TagID:0x84
    [end of domain flag ("opera")] TagID:0x84

    ※:↑かなり内容を端折ってます

Opera11だからなのか、オイラの読み違いなのかわからんがの。
とりあえず、一通り読み込むことは成功した。DomainとCookie Nameを指定してCookie Valueを取得するのはうまくいっていない・・・。

« 今週届いた本 | トップページ | ニコニコ動画のセッション用Cookieについてメモ »

コメント

This web site is certainly instead helpful considering that I’m in the minute developing a web floral internet site - though I'm only beginning out for that reason it is truly rather tiny, absolutely nothing such as this web site. Can website link to some from the posts right here because they are really. Many thanks considerably. Zoey Olsen

コメントを書く

(ウェブ上には掲載しません)

トラックバック


この記事へのトラックバック一覧です: WebブラウザのCookie メモ:

« 今週届いた本 | トップページ | ニコニコ動画のセッション用Cookieについてメモ »