Notice: You have been identified as a bot, so no internal UID will be assigned to you. If you are a real person messing with your useragent, you should change it back to something normal.
Anonymous F joined in and replied with this 2 years ago, 18 minutes later, 3 hours after the original post[^][v]#1,286,037
Use a VM. Setup the preference you want in the browser. Power off the VM and backup the virtual disk.
Power on and browse as you wish. But then restore the virtual disk from backup each time you power the VM down. So if you get infected with anything it won't persist longer than one session. Obviously don't do anything sensitive in the VM.
I think Qemu has a way to track changes so you don't have to overwrite multiple GBs of data each time you restore the backup. I think you can just delete the modifications that are stored separately from the source drive. I don't remember for sure, but I vaguely remember something like that. qcow2? something or another.
I think the biggest practical problem may be sites won't work that well unless you're just on simple sites like imageboards, or wikipedia. Web standards are bloating needlessly fast these days.