In firefox: about:config -> privacy.firstparty.isolate = true
Note that containers provide similar functionality but in a less rigid manner. On the other hand first party isolation has the advantage that it also applies on navigation within a single tab while containers are fixed within a single tab. Currently neither is a superset of the other. If bug 1323873 [0] gets implemented then containers + some scripting by extensions could act as a superset of first party isolation.
[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1323873