If this homepage.aspx were just HTML markup (HTML page), it would probably be easier to create an HTML file with ‘aspx’ extension to prevent default file download action in SharePoint. But the page would not be dressed with SharePoint chrome. I have used a REST request to get the JSON-formatted information of the ASPX file, but I don’t think changing the ASPX content by manipulating the JSON data and POSTing it via REST is the way to go.
The tip of my brain is not thinking of the easy solution. How is this done? Another task is to create an ASPX page in a new browser tab filled with markup and ensure it is surrounded by SharePoint chrome (not just a plain HTML page served up.