Having the Firefox cache in $HOME slows Firefox down when $HOME is on a network, e.g. over NFS. This article documents moving Firefox' cache out of $HOME.
Our users have their homedirs on an NFS server. Firefox is slower than it should be because its cache is on NFS.
Yes, that MyCompany.cfg has to go in /usr/lib/firefox. I know of no way to change its location. Neither does Mike.
Part of the Preferences API mentioned at MIT also works in all-MyCompany.js. But e.g. 'env' seems not to exist there. So you really do need to create that MyCompany.cfg.
This Cambridge doc originally got me on the right track.
The ratio between correct and outdated, beside-the-point, or just plain wrong information I could google up on this topic was particularly poor.