Saturday, August 29, 2009

Google Chrome Multiple Home Pages

Recently I started using Google's browser Chrome (well technically chromium) on Linux for my browsing needs. It is very fast, low on CPU and Memory, I quite like it. I am now also sure Flash plugin is teh CPU hog pig :) Anyway, one really cool feature I missed from Firefox was the ability to set multiple pages as the homepage. The thing is, I follow quite a lot of tech news sites, and I need to check them every now and then. In firefox, I'd just click the Home button, and it would open all of them, I could not find this functionality out of the box with Chrome. What is a geek to do ? Well of course write some javascript :)

So, here is how I resolved this issue:
- Open a new tab, the bookmarks toolbar appears, right click it choose add page
- Choose a Name for the bookmark
- In the URL field, paste the following javascript

javascript:(function(){ window.location.href='http://site1.org/'; window.open('http://site2.com/'); window.open('http://site3.com/'); window.open('http://site4.com/'); })();


That is it :) Keep adding more sites as much as you want. Pretty straightforward, but I thought I'd blog it since it might not be all that obvious

32 comments:

Unknown said...

Firefox can open also multiple homepages. Divide them by a | sign

MfG Jan

Unknown said...

This is great! Thanks.

Anthony said...

Skip the bookmarklet -- just paste that javascript into the "Home Page" pref field and it works as expected when clicking the "Home" button. Nice!

jmbnrh said...

Super cool!! Thanks.

Unknown said...

Thanks, I was about to go back to Firefox before I found this multiple homepage workaround!

Mandeep said...

Extremely helpful, thank you!!

TEROS7776 said...

Thank you so much for this fix, as I was about to delete Chrome from my programs because I like more than one homepage.

Unknown said...

I'm another firefox user who missed the multiple home page option.
Thanks for the fix!
Now if we can fix the missing sidebar for bookmarks,history, etc. we'll miss firefox even less.

Unknown said...

I'm another firefox user who missed the multiple home page option. Thanks to dashard's suggestion and the java fix found here; http://foss-boss.blogspot.com/2009/08/google-chrome-multiple-home-pages.html
It works great, thanks AHMED!!! You just copy and paste it right into Tools/Options/Basics/Home Page/Open this page. Make sure you don't paste in the http:// when you're adding your pages like I did, it's already in the java.
Now if we can find a fix for the missing sidebar for bookmarks, history, extensions, etc. like is available for firefox we'll miss it a little less.

Mark said...

This works great. You can even paste the script into the Home page field (under your Chrome options) and it works just the same, without using a bookmark

Englishman in Ankara (Turkey) said...

Thanks for this, just what I needed!

I'll do anything to get away from that monster Internet Explorer... :-)

Unknown said...

I tried this and it didn't work for me :(
I am using a Mac, so could that be the difference?

Here is what I pasted:
javascript:(function(){ window.location.href='http://google.com/'; window.open('http://hotmail.com/'); window.open('http://msn.com/'); window.open('http://usatoday.com/'); })();

Kamal said...

Hey Jen,
Your line of code works for me as is copy/paste on chrome8 on Ubuntu Linux. I don't really think a mac would change anything, but if it does I wouldn't really know

Try the line on another computer, another chrome version perhaps and start drawing some conclusions. Good luck!

Unknown said...

Hey there, I actually just realized on Google Chrome they added a place where you can add all of your homepage tabs. They must have heard the feedback and added this feature to their latest version! Thanks though...

Jen

Unknown said...

This is weird, I have 4 webpages for my homepage and they all open up, problem is my first one is my verizon email, and it asks me for a username and password. I enter them then it gives me the error "Password contains a blank space at position 13." Of course I have a blank space at position 13 because my password is 12 characters long.

That may be a verizon error, problem is I open the same 4 pages in IE and firefox, and neither of them gives me an error and they open my email page just fine when I enter email and password.

Do you know why it won't open up in Chrome?

Kamal said...

hmm not really, maybe chrome has saved a wrong password (one with a space at the end) ?

Unknown said...

That's not it though, I entered my username and password and doublechecked the keys when I entered them. I'm confused, IE and firefox both log me into this page, I can't figure out why chrome is giving me this error.

Unknown said...

This is weird, now it's working like nothing was ever wrong. I open my homepage and it's the first one to open, and it has my username and password listed, as it always did, but when I press login it gave me the error message. Now it logs me right in, it's the same user and password that wouldn't log me in before, it was just saved for me to push the login button. Now it takes me to my email. I'm not sure why, just yesterday it wasn't. But that's good, hopefully it will last.

Jeremy said...

There's a problem with the syntax above on Windows. Try the following syntax instead:

javascript:window.location.href='http://www.site1.com';window.open('http://www.site2.com').blur();window.open('http://www.site3.com').blur();window.focus();

I added the "blur()" and "window.focus()" functions to make the usability a bit nicer. These functions aren't really needed, so the most basic implementation could be:

javascript:window.location.href='http://www.site1.com';window.open('http://www.site2.com');window.open('http://www.site3.com');

I'll check it on Linux at some point. I don't have access to a Mac system so I don't know if this will work on OS X.

Later,
-Jeremy

Ridhi Sharma said...

What is the google chrome keyboard shortcut to open the extension menu?
Thank-you
Silver MLM

Russell Angus said...

Hi, This didn't work for me. 4 random websites appeared on my bookmark?

Immlang said...

Thank you very much. This worked a treat. I followed dashard's advice and that worked first time.

Unknown said...

This stopped working for me with the latest chrome update...

Kamal said...

Yeah! Post a bug to Google. In the mean time, this work around works .. right click the bookmark, and choose open in a new tab!

Unknown said...

This worked great for me. But now is broken in Chrome Version 22.0.1229.79 m.

Unknown said...

This has been working great for me.

It now is broken in Chrome Version 22.0.1229.79 m.

Unknown said...

This has been working great for me.

It now is broken in Chrome Version 22.0.1229.79 m.

Michael said...

Got a question... recently, the script is doing something weird for me. I have 6 tabs that open with the homepage button. This has been working fine. Recently though, when pushing home button, the first 2 tabs are created, but then the remaining 4 open up as new windows. Don't know what changed. Any thoughts?

Michael said...

Got a question... recently, the script is doing something weird for me. I have 6 tabs that open with the homepage button. This has been working fine. Recently though, when pushing home button, the first 2 tabs are created, but then the remaining 4 open up as new windows. Don't know what changed. Any thoughts?

Kamal said...

Weird no idea why that'd happen! Make sure you're on the latest chrome, that's all I can advise

Unknown said...

I have the same problem, have the latest chrome, java, etc. Works if I click the plus sign and get the chrome extensions home page and click on one of the links like (addons) and then clicked the shortcut button I have created for the javascript command.

Congregation Shaare Emeth said...

Thank you so much! This is great! I know a good bit of HTML but not any javascript. This is very helpful.