pull down to refresh

It's often very helpful to have a copy of a webpage as it appeared the moment you saw it.
Sometimes webpages will alter their content, tweets will be deleted, terms-and-conditions will change, or a page with dynamic content (like the price of bitcoin, for example) will constantly change, and you want a way to look back to how things were at a specific moment in time.
The easiest way to do this is to use archive.today. But manually going to their site and plugging in a URL is cumbersome and time consuming.
Make it easy by creating a bookmark and placing that bookmark in your browser's bookmarks toolbar by doing this:
(assuming you are using Firefox browser on a desktop computer)
  1. Open https://archive.today webpage in your browser.
  2. Bookmark that webpage by clicking the star icon in your URL bar, or simply press Ctrl-D. For the Location, choose Bookmarks toolbar.
  3. If your bookmarks toolbar is not already visible, make it visible by choosing ☰ -> bookmarks -> show bookmarks toolbar.
  4. Position your archive.today bookmark somewhere that will be easily accessible, always visible, since you will likely be using it frequently. You can reposition bookmarks on the bookmarks toolbar by clicking-and-dragging them to wherever you want them. My bookmarks toolbar looks like this (with the archive.today link circled in red, but named archive.ph to save space):
  5. Now we will Edit the bookmark by hovering over it, right-click, Edit bookmark... and make the URL exactly what is in the field below. (Triple-click in the box to select all, copy it, then paste it into the URL field of the bookmark you are editing)

javascript:void(open('https://archive.today/?run=1&url='+encodeURIComponent(document.location)))
6. Save the edited bookmark.
You're done.
Now whenever you are viewing a page that you want to archive, simply click your archive.today bookmark in your bookmarks toolbar. When you click that button, a new browser tab will open and the magic will start happening immediately. It may take a few minutes for the service to capture all of the elements of the webpage. Be patient. When it's done you will get the shortened URL for that archived page. You can share that URL with anyone, anywhere. As long as the archive.today remains working, you will have an archived copy of your webpage as it appeared at the moment you captured it.
For example, one of my recent SN posts was #583218. I opened that page, clicked on my archive bookmark button, and within a few moments I had this shortened URL: https://archive.ph/0GHPe
If you found this tutorial helpful in any way, please consider zapping me a few sats.
100 sats \ 1 reply \ @tomlaies 23 Jun
I can also recommend the browser extension Singlefile. Just get the whole webpage in a single html file. Keep it offline. Personal archives, the libraries of modernity.
reply
Singlefile
Found it at https://github.com/gildas-lormeau/SingleFile. Cool, thanks! Will use it.
reply
This is very handy.
Is this what's referred to as a Bookmarklet?
Also, everyone should be cautious about copy/pasting JavaScript code into their browser. This is a common attack vector on the internet.
ETA: I wrote about something similar to this in #161752
reply
I looked up the definition of a bookmarklet here:
A bookmarklet is a bookmark stored in a web browser that contains JavaScript commands that add new features to the browser. They are stored as the URL of a bookmark in a web browser or as a hyperlink on a web page. Bookmarklets are usually small snippets of JavaScript executed when user clicks on them. When clicked, bookmarklets can perform a wide variety of operations, such as running a search query from selected text or extracting data from a table.
So, yes, the code snippet that I shared would indeed be considered a bookmarklet.
Cool, I never knew it was called that until you mentioned it. Thanks!
reply
Also...
Once you've created a shortlink to a page that you've archived using the bookmarklet, if you highlight something within the archived page, the URL of that archived page will instantly change to reference the exact part(s) you've highlighted. That way if you need to refer to a specific part of some page to someone else, you can just share the shortened URL with the reference included in the shared URL, like this.
reply
Thanks for the info. It also works great for getting past paywalls. I use the Evernote extension for collecting web page snippets, e.g. recipes.
reply
Indeed it does.
reply