-
-
Notifications
You must be signed in to change notification settings - Fork 97
Other Questions
Are you using JavaScript for redirection? I'm not 100% sure, but you might get a fraction of a second faster redirects by using the HTTP REFRESH method. I turned off the "Hide text" and it seems like you're using JavaScript. Could you try using the HTTP method? Oh, just set the content refresh to zero by the way. My second most favorite extension so far, excellent work.
The short answer: no.
New Tab Redirect doesn't work only on HTTP and HTTPS protocols. You can enter anything you want into the new tab url on the options page. For instance:
- chrome://bookmarks
- chrome://extensions
- about:memory
- about:version
- about:blank
- http://www.ipreferjim.com
- ftp://someinternalmachine/my_drop
- file:///home/jim/Documents/mypage.html
The possibilities are limitless. However, there are two reasons why a meta refresh tag will not work:
-
metatags can not be set with JavaScript -
metatags do not support the browser-specific protocols such aschrome://andabout:
Point 1 is important because the way to persist options from the options page to the new tab page is done through HTML 5's localStorage, and is orchestrated through the background.html which acts as a long-running service for Chrome extensions. The only way to do this is through JavaScript. If I remove JavaScript from the equation, there is no way to persist your page option.
...well, I could probably use the FileReader and FileWriter APIs which are also HTML5. However, this API is not standardized and would most likely be a maintenance nightmare. I already get 10-20 complaints a month about how my extension is harmful because it changes how Google Chrome acts. Unfortunately (or fortunately, since that's what it's meant to do), it is an extension and users shouldn't be randomly installing extensions that they don't trust, don't understand, and don't know how to remove. That's why I've made everything open source, provided how-to guides, and even provided a walk-through explaining all the code and development process...
Point 2 is important because I personally like to switch between about:version and chrome://history. I know most users only link to web sites and local files, but there are a lot who prefer the about: pages.
Excellent suggestion, though!
This method (your suggestion) is exactly how example New Tab override pages are shown in the Developer's Guide for Google Chrome Extensions. If you're interested in "packing" your own extension, you can download the source code to the iGoogle New Tab Page here, change the link's location in the html file, then navigate to chrome://extensions, click developer mode then "Load unpacked extension" and browse to your file. BAM! you have your own, instant-loading New Tab override page!!