The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,229 other subscribers

JavaScript bookmarklet to replace part of the WayBack machine URL

Posted by jpluimers on 2023/05/23

Quite often while saving a URL in the WayBack Machine, the response often is headed “Sorry” with non-descriptive “Job failed”.

In the background however, at least half of those times the job actually succeeded.

Some periodes that success rate was way lower as the archival job didn’t start with a GET request. The workaround was to use a POST request, see I want to check out how to do POST requests using bookmarklets in order to save URLs to the WayBack machine and [Archive] Jeroen Wiert Pluimers on Twitter: “Does anyone why the @waybackmachine has a lot of job failed and 404 errors over the last few days? … and … just returned a 404; most of my archivals the last few days failed or had to be retried at least half a dozen times to succeed. …” / Twitter

The error message in both “Job failed” cases is the same, so it makes sense to differ between the first case (job started and complete, but web interface failed to get that) and the latter (job didn’t even start) by doing the below URL replacement with a bookmarklet:

And indeed this bookmarklet does it (with the same above bolded parts):

javascript:(function() {window.location=window.location.toString().replace(/^https:\/\/web\.archive\.org\/save\/http/,'*/http');})()

It can even be simpler (but maybe not fully conformant to specs):


A bookmarklet that goes to the latest rendered saved version (sometimes saved versions have not been rendered yet, so you get the latest available render):


The WayBack Machine uses a 14-position ID and tries to find the render that is the most close by. This is the format of the ID:


This is granular enough, as the WayBack Machine only allows new saves that are usually 30+ minutes apart.

Some thoughts

I am always surprised where JavaScript requires which quotes and where it can do without. The above is an example of this.

Via [Wayback/Archive] javascript bookmarklet replace part of url – Google Search:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: