Every page will have a unique class to the body. Hide the header and footer on the specific page using the class.
However, if you are hiding the header and footer, you are probably going for a Landing page independent of your website design. I don’t suppose this is the right approach in that case. Because the page still loads all page resources and then hides them. I m looking for a {% layout none %} option like we use in Shopify 1.0 version.