开发者

Force Firefox to drop SQLite lock from cookies.sqlite

I'd like to delete certain Firefox cookie. The problem is I'd like to do it when Firefox is open. When I t开发者_开发问答ry to access the cookies.sqlite I get the database is locked error. Is there any way I can force Firefox to drop the lock without closing firefox?


Nope. Not that it matters since just deleting it out of the database will not change the program's run-time behavior (short of causing logic errors upon update perhaps) since all cookies are stored in a hash table. The database is just to keep cookies across sessions.


On Unix (that should include MacOSX, Linux, BSD, ...), you can do something like this:

#!/bin/sh
NAME=/tmp/cookies.$$
cp $HOME/.mozilla/firefox/*.default/cookies.sqlite $NAME
sqlite $NAME 'Play your perverse games with the data here.'
cp $NAME $HOME/.mozilla/firefox/*.default/cookies.sqlite
rm $NAME

Although as sdwilsh has mentioned this will probably not achieve what you want, but the above pattern is at least useful for extracting data from the sqlite databases that firefox uses.


Can't you do it using sqlite manager extension for firefox?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜