How can I enable backspace to go back in Safari on Mojave?
You can add a keyboard shortcut from the terminal, but this requires you to disable system integrity in macOS 10.14 Mojave and later.
defaults write com.apple.Safari NSUserKeyEquivalents -dict-add Back "\U232b"
Alternative, you can install a Safari Extension which injects a script that bring back the functionality:
https://github.com/yene/Safari-Backspace
For example:
document.addEventListener("DOMContentLoaded", function(event) {
function handleBackspace(e) {
if (e.keyCode === 8 && !e.ctrlKey && !e.shiftKey
&& e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA'
&& e.target.contentEditable !== 'true' // TinyMCE
) {
e.preventDefault();
window.history.go(-1);
}
}
window.addEventListener('keydown', handleBackspace, false);
});