Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 24 Sep 2018, 15:04
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
browser-cleanup
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
jpeps

Joined: 31 May 2008
Posts: 3217

PostPosted: Mon 17 Oct 2011, 01:52    Post subject:  browser-cleanup  

I just updated my way of cleaning out the browser cache and flash cookies from a mozilla file linked to my HD (for some reason, the mozilla link now works...which saves a lot of RAM).

The script is set for firefox, but could be adapted to seamonkey. "touch /tmp/mark" is added to the browser load script (eg, /usr/local/bin/defaultbrowser), so new cache files can be tracked and deleted with an "exit" script.

If I want to save cookies, I just exit the browser without the script. I also keep a mozilla backup for a pristine restore.

Exit script:

Code:

#!/bin/sh

## mozilla directory
moz="/mnt/sda2/Desktop/.mozilla"

## close FF
VAR="$(ps | grep -v grep | grep "/firefox" | awk '{print $1}')"

[ $VAR ] && kill -15 "$VAR"

## Remove Flash Objects:

rm -r /root/.macromedia/Flash_Player/\#SharedObjects/* 2>/dev/null

if [ ! -f /tmp/mark ]; then
echo "First create: /tmp/mark"
exit
fi

## Find new cache files & delete 

find "$moz" -type f -newer /tmp/mark | grep "Cache"  >/tmp/list

while read line; do
rm "$line"
done </tmp/list




Here's a log for files deleted after a 2 minute session (BTW/ setting prefs to delete cookies upon exit didn't help a bit Smile ).

Code:

.macromedia/Flash_Player/#SharedObjects/P88B3T5F

.mozilla/firefox/h4iu7wbo.default/Cache/E/C7/2504Dd01
.mozilla/firefox/h4iu7wbo.default/Cache/E/44/100CCd01
.mozilla/firefox/h4iu7wbo.default/Cache/_CACHE_MAP_
.mozilla/firefox/h4iu7wbo.default/Cache/D/28/700BFd01
.mozilla/firefox/h4iu7wbo.default/Cache/D/E8/99C81d01
.mozilla/firefox/h4iu7wbo.default/Cache/5/0E/34AD1d01
.mozilla/firefox/h4iu7wbo.default/Cache/4/A7/470EEd01
.mozilla/firefox/h4iu7wbo.default/Cache/9/5A/5BC03d01
.mozilla/firefox/h4iu7wbo.default/Cache/_CACHE_002_
.mozilla/firefox/h4iu7wbo.default/Cache/3/C5/F36B1d01
.mozilla/firefox/h4iu7wbo.default/Cache/F/FC/1BCE4d01
.mozilla/firefox/h4iu7wbo.default/Cache/F/3D/CA8CEd01
.mozilla/firefox/h4iu7wbo.default/Cache/C/8B/960A1d01
.mozilla/firefox/h4iu7wbo.default/Cache/C/1D/E0284d01
.mozilla/firefox/h4iu7wbo.default/Cache/_CACHE_001_
.mozilla/firefox/h4iu7wbo.default/Cache/2/51/2B973d01
.mozilla/firefox/h4iu7wbo.default/Cache/2/07/F4C3Ad01
.mozilla/firefox/h4iu7wbo.default/Cache/_CACHE_003_
Back to top
View user's profile Send private message 
puppyluvr


Joined: 06 Jan 2008
Posts: 3481
Location: Chickasha Oklahoma

PostPosted: Tue 18 Oct 2011, 22:13    Post subject:  

Very Happy Hello,
What sbout the huge sqlite files??

_________________
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...
Back to top
View user's profile Send private message Visit poster's website 
jpeps

Joined: 31 May 2008
Posts: 3217

PostPosted: Wed 19 Oct 2011, 03:54    Post subject:  

puppyluvr wrote:
Very Happy Hello,
What sbout the huge sqlite files??


The large file is urlclassifier3.sqlite. If you delete it'll just reinstall itself again every time you load the browser (it's allegedly a list of phishing sites used for security purposes). Places.sqlite is your bookmarks, annotations, etc.

I'd recommend leaving them alone for regular use, but you can always delete them or copy over your backup.

The biggest mistake is to have both Seamonkey and Firefox in your .mozilla folder. Deleting an unused brower will cut the size in half.
Back to top
View user's profile Send private message 
Barkin


Joined: 12 Aug 2011
Posts: 823

PostPosted: Fri 16 Dec 2011, 14:11    Post subject: Re: browser-cleanup  

jpeps wrote:
cleaning out ... flash cookies from a mozilla


There's an app for that ... https://addons.mozilla.org/en-US/firefox/addon/betterprivacy/

It gives you the option to save some flash cookies whilst deleting the rest.
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5087
Location: Arizona, U.S.A.

PostPosted: Fri 16 Dec 2011, 15:20    Post subject:  

Hi all; Vovchik told me about this trick for PCs with less than 1 GB of ram:
In Firefox address bar type: about:config
It will warn you, click button to access the configuration screen.
Find these 2 lines and double click them to disable ( false ) them:
Code:
browser.cache.disk.enable;false

browser.cache.memory.enable;false

There`s other lines associated with these, but I haven`t tried them.
I think they only matter if these lines are enabled.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4834
Location: Kingwood, TX

PostPosted: Mon 19 Dec 2011, 05:25    Post subject:  

Code:
#!/bin/sh
#killall firefox seamonkey-bin #I don't think killing is necessary???
for x in $HOME/.mozilla/*/*/cookies.txt ; do
   while read A || [ "$A" ] ; do
      case $A in
#only save cookies from these sites
         *murgalinux.com*|*puppylinux.*)echo "$A";;
         *.xxx*)echo you naughty puppy >/dev/stderr;;
         *)echo removing $A >/dev/stderr;;
      esac
   done <$x >$x~
mv -f $x~ $x
done

rm -rf $HOME"/.macromedia/Flash_Player/\#SharedObjects/"* 2>/dev/null

echo cookies removed

_________________
Check out my github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 8680
Location: qld

PostPosted: Mon 19 Dec 2011, 05:33    Post subject:  

technosaurus wrote:
Code:

         *.xxx*)echo you naughty puppy >/dev/stderr;;
         

hmmm.... Laughing

_________________
Puppy Linux Blog - contact me for access
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4834
Location: Kingwood, TX

PostPosted: Mon 19 Dec 2011, 06:51    Post subject:  

thought about using this for *.microsoft.com*|*.bing.*)...

Code:
rxvt_hold() { rxvt -bg blue -fg white -e sh -c " ${*} ; read " ; }
center_msg(){ MSG="$@"; echo -e "\033[$((`tput lines`/2));$(((`tput cols`-${#MSG})/2))H $MSG" ; }
export -f center_msg

...

*.microsoft.com*|*.bing.*|*.hotmail.com*)
rxvt_hold "center_msg What did you think would happen if you visited an Microsoft site?"

_________________
Check out my github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0451s ][ Queries: 12 (0.0086s) ][ GZIP on ]