How to Download a Webpage Archive with Safari for Mac
Have you ever wanted to download and save a particular web page as an archive for whatever reason? Maybe it’s an old simple personal home page you want to keep, or perhaps you want an archive of a particular website or collection of web pages for some other offline use. Safari for Mac OS offers a simple way to download and save webpages as something called a Web Archive, which are self-contained little archive files of any given web page that can be accessed locally.
When you save a web page as a web archive in Safari to a local Mac, all of the webpage text, article content, images, style sheets, and other web content will be kept in that web archive file. That file can be opened locally on the Mac even if is not online, however the links included in the web page will still reference the original source URLs and thus following those links would still require online access, as would posting to forms and performing other functions that require internet access.
And in case you were wondering, this is not a sufficient means of backing up a website or web server, which is a much more complex process as nearly all modern websites have many backend components, code, databases, scripts, and other information that would not be retrieved through this simple web archive creation.
How to Save a Webpage as a Web Archive in Safari on Mac
- Launch Safari on the Mac if you have not done so already
- Open the webpage you wish to download for offline use and access, for example this current page
- Go to the “File” menu in Safari and choose “Save As”
- Choose the “Format” pulldown and select “Web Archive” then choose to save the web page archive into the desired location
The webpage will now be saved as a .webarchive file that will open in Safari, it’s a self-containing file that will hold the webpage data, text, content, images, style sheets, and other components of the web page.
From the Finder you can now locate the .webarchive file you created and saved, and open it directly into Safari. You’ll notice in the URL bar the webpage is being read from the local file system rather than a remote server, in the path format of something like “file:///Users/USERNAME/Desktop/SavedWebPage.webarchive”
Webpage archives are often several megabytes in size, though sometimes they can be tiny or a lot larger, depending on the web page being saved.
Note this is not a solution to backup an entire web site. If you wanted to retrieve an entire webpage or website and related directory for backup purposes, the best approach would be to login to the appropriate web server via SFTP and download all of the web files directly. If you don’t know how to do that, contact your web hosting provider. The next best would be to use wget to mirror a site, or a similar tool, though wget and curl will not download scripts, databases, nor backend information.
This can offer an interesting way to create a local web archive of certain web pages, but it is not the only way to read and view webpages offline, however. The Reading List feature in Safari for Mac and iOS also allows offline viewing of webpages and articles, and you can also use Print to PDF on the Mac or save webpages to iBooks in iOS, or also use Save As PDF on the iPad or iPhone to accomplish the same task from any webpage viewed in Safari.
It’s worth mentioning that if you can use the this trick to print a web page without ads but stop short of printing, and simply save from the Reader view if you want to save a simplified version of the website in question too.