Onload Enviar formulário apenas uma vez

function submit() {
    if (!sessionStorage.getItem("submitted")) {
        console.log("submitting");
        sessionStorage.setItem("submitted", "true");
        document.getElementById("post").submit();
    } else {
        console.log("already submitted, not repeating");
        sessionStorage.removeItem("submitted");
    }
}
Tyagi420