Firefox/Profile on RAM

Assuming that there is memory to spare, placing Firefox's cache or complete profile to RAM offers significant advantages. Even though opting for the partial route is an improvement by itself, the latter can make Firefox even more responsive compared to its stock configuration. Benefits include, among others:

reduced drive read/writes;

heightened responsive feel;

many operations within Firefox, such as quick search and history queries, are nearly instantaneous.

Because data placed therein cannot survive a shutdown, a script responsible for syncing back to drive prior to system shutdown is necessary if persistence is desired (which is likely in the case of profile relocation). On the other hand, only relocating the cache is a quick, less inclusive solution that will slightly speed up user experience while emptying Firefox cache on every reboot.

The script

The script will first move Firefox's profile to a new static location, make a sub-directory in /dev/shm, softlink to it and later populate it with the contents of the profile. As before, replace the bold sections to suit. The only value that absolutely needs to be altered is, again, xyz.default.

Be sure that rsync is installed and save the script to ~/.local/bin/firefox-sync, for example: