Sample Header Ad - 728x90

How to save an HTML page from a web site using Chrome

3 votes
2 answers
7448 views
I have a web site that has some simple HTML pages with no images, no external CSS or JavaScript references. So the whole HTML page is a single self-containing file that has HTML code, together with *inline* CSS and JavaScript code. In other words, once I copy the HTML file into my Downloads folder on my mobile device, I can use it (while being ***offline***) by loading the following into the Chrome browser: file:///storage/emulated/0/Download/my_page.html The problem is that I cannot download the web page from my web site into the Downloads folder using Chrome on my mobile device: When I go to: https://my-site.tld/xxx/my_page.html and display the page in the mobile browser, I can use the download (⭳) button on Chrome browser's tab; however it creates an .mthml file instead, with a name like this: Title of My Page.mhtml When I try to open this file while my mobile device is offline, none of the interactive content on the page (e.g., buttons, input boxes, etc.) is enabled. Note that my page contains interactive content that is processed ***locally*** by JavaScript contained in the page. Currently, the only solution is to connect my mobile device to my PC (using USB for example) and copy the .html file from my PC to the mobile's Downloads file. Once I copy the .html file and open it on my mobile device using the file:///... URL as given above, the page's JavaScript works as expected (contrary to the .mhtml version). Assuming that the .html page on my-site is updated frequently, it is tedious to download it to PC and copy over my mobile phone when I need an update. There must be a more direct way.
Asked by FedKad (120 rep)
Sep 12, 2020, 12:04 PM
Last activity: Jan 20, 2025, 01:47 AM