How to set about:blank as new tab page?

Discussion about official Mozilla Firefox builds
Post Reply
User avatar
Caspid
Posts: 582
Joined: December 18th, 2005, 4:01 pm

How to set about:blank as new tab page?

Post by Caspid »

The latest update implements a new New Tab page, with an option to show a blank page; however, this blank page is not about:blank. How do I get about:blank as the new tab page again?
"Know what I pray for? The strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference." -Calvin
User avatar
Virtual_ManPL
Posts: 2052
Joined: July 24th, 2008, 5:52 am
Contact:

Re: How to set about:blank as new tab page?

Post by Virtual_ManPL »

Virtualfox persona
Tired of constant Firefox UI changes? XUL extensions are not working anymore? Try SeaMonkey, Waterfox Classic, Pale Moon.
User avatar
Caspid
Posts: 582
Joined: December 18th, 2005, 4:01 pm

Re: How to set about:blank as new tab page?

Post by Caspid »

Thanks, but is there a way to do it without an extension?
"Know what I pray for? The strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference." -Calvin
User avatar
JayhawksRock
Posts: 10433
Joined: October 24th, 2010, 8:51 am

Re: How to set about:blank as new tab page?

Post by JayhawksRock »

Caspid wrote:Thanks, but is there a way to do it without an extension?

The preference browser.newtab.url still works (for now) so add it to about:config as a string and and about:blank as the value
"The trouble with quotes on the internet is you never know if they are genuine" ...Abraham Lincoln
User avatar
WaltS48
Posts: 5141
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Re: How to set about:blank as new tab page?

Post by WaltS48 »

Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5
User avatar
Caspid
Posts: 582
Joined: December 18th, 2005, 4:01 pm

Re: How to set about:blank as new tab page?

Post by Caspid »

Yeah, no dice. I already had the browser.newtab.url preference set.
"Know what I pray for? The strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference." -Calvin
User avatar
JayhawksRock
Posts: 10433
Joined: October 24th, 2010, 8:51 am

Re: How to set about:blank as new tab page?

Post by JayhawksRock »

This is a list of ALL Modified (bold) newtab related prefs and their values. The result gives me a blank tab (labled New Tab) when about:newtab is entered in the address bar or I double click on the tab bar or click the new tab button. Maybe yours are different than mine on my WinXP

browser.newtab.url;about:blank
browser.newtabpage.directory.ping (no value used)
browser.newtabpage.enabled;false
browser.newtabpage.enhanced;false
browser.newtabpage.introShown;true
browser.newtabpage.storageVersion;1
browser.newtabpage.updateIntroShown;true

All others show default and there are 11 total prefs
"The trouble with quotes on the internet is you never know if they are genuine" ...Abraham Lincoln
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Re: How to set about:blank as new tab page?

Post by dickvl »

I've added this code to my mozilla.cfg file to set the new tab page to about:blank and save the value to browser.newtab.url

Code: Select all

var newTabURL = "about:blank";
try {
Components.utils.import("resource:///modules/NewTabURL.jsm");
NewTabURL.override(newTabURL);
pref("browser.newtab.url",NewTabURL.get());
}
catch(e) {
pref("browser.newtab.url",newTabURL);
}


Shorter code:

Code: Select all

var newTabURL = "about:blank";
Components.utils.import("resource:///modules/NewTabURL.jsm");
NewTabURL.override(newTabURL);

// you can use this to save a copy to browser.newtab.url
pref("browser.newtab.url",NewTabURL.get());
Last edited by dickvl on October 3rd, 2015, 1:46 pm, edited 1 time in total.
User avatar
JayhawksRock
Posts: 10433
Joined: October 24th, 2010, 8:51 am

Re: How to set about:blank as new tab page?

Post by JayhawksRock »

@dickvl
thanks much..
"The trouble with quotes on the internet is you never know if they are genuine" ...Abraham Lincoln
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Re: How to set about:blank as new tab page?

Post by dickvl »

Note that if necessary that you can use these calls in the Browser Console (Firefox/Tools > Web Developer):

Code: Select all

NewTabURL.get();
NewTabURL.override("about:blank");


http://mxr.mozilla.org/mozilla-central/ ... TabURL.jsm
resource:///modules/NewTabURL.jsm
User avatar
Virtual_ManPL
Posts: 2052
Joined: July 24th, 2008, 5:52 am
Contact:

Re: How to set about:blank as new tab page?

Post by Virtual_ManPL »

@ JayhawksRock - browser.newtab.url preference in about:config doesn't work anymore for about 2 Nightly releases per Bug 1118285 - The browser.newtab.url preference is abused and should be removed
Virtualfox persona
Tired of constant Firefox UI changes? XUL extensions are not working anymore? Try SeaMonkey, Waterfox Classic, Pale Moon.
User avatar
jscher2000
Posts: 11742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: How to set about:blank as new tab page?

Post by jscher2000 »

dickvl wrote:I've added this code to my mozilla.cfg file to set the new tab page to about:blank and save the value to browser.newtab.url

I suspected that would work but hadn't gotten around to testing it.

Unfortunately, this means it's still possible for malware to hijack the new tab page, and it's even more obscure than about:config. Sigh.
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Re: How to set about:blank as new tab page?

Post by dickvl »

You can override the mozilla.cfg file in this case via an extension that set the new tab page because it is not a pref that can be locked.
At least this still works with current versions of CTR installed and with this feature not enabled in CTR.

You would need far more complex code and add an event listener to monitor for changes to the new tab page.
You can set the mozilla.cfg file to read-only to make it more difficult to modify this file.
User avatar
Peja Stija
Posts: 649
Joined: June 4th, 2008, 8:46 am
Location: Belgium (proud producer of waffles)

Re: How to set about:blank as new tab page?

Post by Peja Stija »

In a few months, we'll need an add-on to detect that we clicked our mousebutton.
Post Reply