How do we prevent users from clearing history?

User Help for Mozilla Firefox
Post Reply
User avatar
cl0729
Posts: 4
Joined: April 27th, 2006, 8:20 am

How do we prevent users from clearing history?

Post by cl0729 »

We're trying to deploy Firefox 3.6.x in a corporate environment and need to be able to prevent our users from clearing history or setting Firefox to "never remember history". We have already disabled private browsing by modifying the userchrome.css file as described at : http://support.mozilla.com/tiki-view_fo ... tId=411696 and supposedly are preventing FF from clearing history on shutdown by adding these lines to the mozilla.cfg file:
lockPref("privacy.clearOnShutdown.history", false);
lockPref("privacy.item.history", false);
Despite this, the Tools - Options - Privacy tab still has "Never remember history" as an option in the "Firefox will" drop-down box. Can anyone tell us how to prevent our users from clearing history and from allowing them to have Firefox not remember history from withint the GUI? Thanks.
"You'll PAY to know what you REALLY think!" - J.R. "Bob" Dobbs
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: How do we prevent users from clearing history?

Post by patrickjdempsey »

Private Browsing is always available by pressing Ctrl-Shift-P. It's also exceptionally easy to remove items from the history logs through the History Sidebar or the Library. More industrious users could also delete the places.sqlite database after first renaming it to some alternative file name that no-one would ever suspect.

They could also create a second profile that runs entirely in private mode, or use a flash drive to run an entire portable version of Firefox (or the browser of their choice).
Last edited by patrickjdempsey on January 20th, 2011, 7:48 pm, edited 1 time in total.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
cl0729
Posts: 4
Joined: April 27th, 2006, 8:20 am

Re: How do we prevent users from clearing history?

Post by cl0729 »

We have modified userchrome.css to remove private browsing from the GUI. We know that the industrious user can find a way around things, but we don't need to make the perfect the enemy of the good. We just need to be able to make sure there's no obvious way to prevent FF from remembering history or deleting it from the GUI.

Any suggestions? There should be a way to do this, I just haven't figured out what it is yet. I'm assuming there must be someone out there who knows enough about the innards of FF to be of assistance.
"You'll PAY to know what you REALLY think!" - J.R. "Bob" Dobbs
User avatar
cl0729
Posts: 4
Joined: April 27th, 2006, 8:20 am

Re: How do we prevent users from clearing history?

Post by cl0729 »

P.S.: it looks like there ought to be a way to do this by editing userchrome.css. I have found, for example, that
#clearDataBox { display: none !important }
will hide the "clear history" box. Does anyone know the code that will hid the "Firefox will" drop-down box in Tools - Options - Privacy? That would probably be adequate for our purposes.

Thanks.
"You'll PAY to know what you REALLY think!" - J.R. "Bob" Dobbs
User avatar
dickvl
Posts: 54161
Joined: July 18th, 2005, 3:25 am

Re: How do we prevent users from clearing history?

Post by dickvl »

You can always easily delete history via the history sidebar or in the Library or use Shift+Ctrl+Del to open Tools > Clear Recent History

You can use the DOM Inspector to find the IDs of items.
You can hide #historyGroup or only #historyMode and #historyDays and #privateBrowsingAutoStart

Firefox will always show the user settings if not all the history settings have the default value.
If you know the pref names then you can easily change them on the about:config

See also:
Public Fox: https://addons.mozilla.org/firefox/addon/3911

http://kb.mozillazine.org/User:Dickvl/P ... ng_disable
User avatar
cl0729
Posts: 4
Joined: April 27th, 2006, 8:20 am

Re: How do we prevent users from clearing history?

Post by cl0729 »

dickvl wrote:You can always easily delete history via the history sidebar or in the Library or use Shift+Ctrl+Del to open Tools > Clear Recent History

You can use the DOM Inspector to find the IDs of items.
You can hide #historyGroup or only #historyMode and #historyDays and #privateBrowsingAutoStart

Firefox will always show the user settings if not all the history settings have the default value.
If you know the pref names then you can easily change them on the about:config


Thanks for the tip; very helpful. We understand that very savvy users can always find some way around these things, but we're really just trying to handle the 90% that aren't that savvy and help send the message that they're not supposed to be deleting History.

I have the DOM Inspector add-in installed but as far as I can see I can only use it to inspect documents. This probably is a dumb question but: how do I use it to find IDs for items in the FF GUI?
"You'll PAY to know what you REALLY think!" - J.R. "Bob" Dobbs
User avatar
dickvl
Posts: 54161
Joined: July 18th, 2005, 3:25 am

Re: How do we prevent users from clearing history?

Post by dickvl »

The DOM Inspector (DOMi) has a menu item (Search > Select Element By Click) and a button to "Find a node to inspect by clicking on it" (left icon on the toolbar).
You first need to open the browser window in the DOMi (File > Inspect Chrome Document) and choose the first from the list.
Click the Find button and use the keyboard (Alt Tab) or the Task bar to go back to the browser window (do not click in the browser window).
Click that element with the mouse and keep the button pressed until you see a red border to indicate the the DOMi has located that element in the DOM tree.
Post Reply