To open a website within an about:blank page (which prevents the destination URL from appearing in the browser history), follow these steps:
- Open a new tab and navigate to
about:blank. - In the address bar, type
javascript: and immediately follow it with the provided script snippet. - When prompted, enter the full URL (including
https://) of the site you wish to embed. - If the browser blocks the action, a popup blocker notification will appear in the top right; click it and select 'Always allow pop-ups from this page' (or similar) and try again.
(function () {
var url = prompt("Paste the link you want to be embedded into an about:blank page.\n(INCLUDE https://)", "https://example.com");
var urlObj = new window.URL(window.location.href);
win = window.open();
win.document.body.style.margin = "0";
win.document.body.style.height = "100vh";
var iframe = win.document.createElement("iframe");
iframe.style.border = "none";
iframe.style.width = "100%";
iframe.style.height = "100%";
iframe.style.margin = "0";
iframe.referrerpolicy = "no-referrer";
iframe.allow = "fullscreen";
iframe.src = url.toString();
win.document.body.appendChild(iframe);
})();