The simplest thing I can think of is to open the file you want to save as source code, which you can do from Chrome Android by prepending view-source to the URL, like so.
view-source:https://my-site.tld/xxx/my_page.html
You can then either copy and paste this code into a local file, or use the share button to open it with a compatible app of your choosing.
If this seems like too much of a pain, you might consider doing something like using PHP to determine whether the file should be viewed or downloaded. For example if the IP address of the request matches your phone, download instead of displaying the file.
<?php
/**
* File url: https://my-site.tld/xxx/my_page.php
*
*/
$remote_address = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_SANITIZE_STRING);
if ($remote_address === '56.57.58.59') {
header("Content-Disposition: attachment; filename=\"filename.html\"\n");
header("Content-Type: text/html\n");
}
?>
<!-- Begin actual page content -->
<!DOCTYPE html>
<html lang="en-US">
<meta charset="UTF-8">
....
Conversely, you could also simply create a separate page to allow a download regardless of the requesting IP address.
<?php
/**
* File url: https://my-site.tld/xxx/my_page-download.php
*
*/
header("Content-Disposition: attachment; filename=\"filename.html\"\n");
header("Content-Type: text/html\n");
readfile('path/to/file');
Additional information about the Content-Disposition header may be found in the Mozilla Developer Docs. It's not the only resource, of course, it's just my personal favorite.
The simplest thing I can think of is to open the file you want to save as source code, which you can do from Chrome Android by prepending view-source to the URL, like so.
view-source:https://my-site.tld/xxx/my_page.html
You can then either copy and paste this code into a local file, or use the share button to open it with a compatible app of your choosing.
If this seems like too much of a pain, you might consider doing something like using PHP to determine whether the file should be viewed or downloaded. For example if the IP address of the request matches your phone, download instead of displaying the file.
<?php
/**
* File url: https://my-site.tld/xxx/my_page.php
*
*/
$remote_address = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_SANITIZE_STRING);
if ($remote_address === '56.57.58.59') {
header("Content-Disposition: attachment; filename=\"filename.html\"\n");
header("Content-Type: text/html\n");
}
?>
<!-- Begin actual page content -->
<!DOCTYPE html>
<html lang="en-US">
<meta charset="UTF-8">
....
Conversely, you could also simply create a separate page to allow a download regardless of the requesting IP address.
<?php
/**
* File url: https://my-site.tld/xxx/my_page-download.php
*
*/
header("Content-Disposition: attachment; filename=\"filename.html\"\n");
header("Content-Type: text/html\n");
readfile('path/to/file');
Additional information about the Content-Disposition header may be found in the Mozilla Developer Docs. It's not the only resource, of course, it's just my personal favorite.
You can copy the html raw content (from view-source) into the textarea on this page
https://jsfiddle.net/o19q5tzy
and press download.
The webpage only contains
<a id="link" href="" download='tmp.html'>download</a><br>
<textarea oninput="link.href = window.URL.createObjectURL(new Blob([this.value], {type: 'plain/text'}))" style="width: 100ch; height: 40ch"></textarea>
Creating / downloading a .html file with a chrome extension
Chrome recognizes all download links as html files - Google Chrome Community
Is it possible to download a websites entire code, HTML, CSS and JavaScript files? - Stack Overflow
Download complete web page from Chrome extension
How can I save a webpage as PDF instead of HTML in Google Chrome?
Can I save a webpage in Chrome for offline viewing on mobile devices?
Can I automate the process of saving webpages for offline viewing in Chrome?
Videos
Hit Ctrl+S and save it as an HTML file (not MHTML). Then, in the <head> tag, add a <base href="http://downloaded_site's_address.com"> tag. For this webpage, for example, it would be <base href="http://stackoverflow.com">.
This makes sure that all relative links point back to where they're supposed to instead of to the folder you saved the HTML file in, so all of the resources (CSS, images, JavaScript, etc.) load correctly instead of leaving you with just HTML.
See MDN for more details on the <base> tag.
The HTML, CSS and JavaScript are sent to your computer when you ask for them on a HTTP protocol (for instance, when you enter a url on your browser), therefore, you have these parts and could replicate on your own pc or server. But if the website has a server-side code (databases, some type of authentication, etc), you will not have access to it, and therefore, won't be able to replicate on your own pc/server.
Not sure I understood your problem, are you writing your own extension or looking for one?
If you're looking for one I'd recommend Save All Resources extension.
Please note: ensure you are aware of the data that is shared by this extension with the developer (privacy). Save All Resources collects the following: Website content For example: text, images, sounds, videos or hyperlinks
yes you can by using HTTrack software. HTTrack allows you to download a World Wide Web site from the Internet to a local directory, building recursively all directories, getting HTML, images, and other files from the server to your computer. HTTrack arranges the original site's relative link-structure. Simply open a page of the "mirrored" website in your browser, and you can browse the site from link to link, as if you were viewing it online. HTTrack can also update an existing mirrored site, and resume interrupted downloads. HTTrack is fully configurable, and has an integrated help system.
download here. https://www.httrack.com/page/2/en/index.html
so hope the answers.
Hi, I've seen a lot of posts here about downloading a whole website.
I only want to download a whole web page, including images. I've tried monolith, but that thing just downloads the html+css and redirects the images to the original source (aka www.site.com). I want to download the images locally too.
What can I use?