Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Accelerator Creation Guide

23 Dec 2009   #1
SGT Oddball

Accelerator Creation Guide


There are a lot of really cool services out there, and I think a lot of them would fit in really well with Accelerators. But even though there’s a lot of value to be had in creating Accelerators, I don’t think we’ve ever had a blog post explaining a step-by-step process for how to do it. I’m hoping this post will help with that.

I’ve been working on the feature for a while, so I’ve come up with some tips and best practices that have helped me become more efficient in building Accelerators. There are also a few mistakes I’ve seen (and made!) over and over again, so I’ll talk about those in the hope of making the development process a bit easier for everyone else out there.

Building an Accelerator

Accelerators streamline the common copy-navigate-paste operation by enabling users to send selected content from the current webpage to one of their favorite services. Fortunately, even though the feature is quite powerful, it’s actually quite easy to write code that uses it. Here’s a step-by-step guide for creating a simple Accelerator.

First, I’ve put up an Accelerator template, with sample information pre-loaded. All you need to do is swap out the sample information for yours. Note that you don’t need to be the service provider to build an accelerator that interacts with a service. If you can find the following information, then you can build an accelerator for virtually any service you want.

Here are the steps:
  1. First, choose a for your Accelerator. This is an important field—all the other URLs in the manifest need to match its domain. Generally speaking, the top-level domain for your service is a good choice.

  2. Fill in the absolute path to your favicon into the field. One trick for doing so: right-click on the service page, view the source, and then search for an .ico file.

  3. Under the node, choose a that’s descriptive of your service, while under 50 characters. We recommend that the name include the Accelerator category followed by the name of the service provider.

    Act with

  4. Choose a “category” attribute for the field. I have another post on categories, but here are the ones we recommend:
      • Blog - A blog service that creates a new blog post based on a link or user-selection
      • Bookmark - A service adds a link to the user's personal bookmarks on the web
      • Define - A service that provides definitions based on a selection
      • Email - A service that provides email communication that can create a new email message
      • Find - service that finds related content within the scope of the site
      • Map - A service that provides map locations based on user-selection
      • Send - A service that converts web data into application data
      • Share – A service that shares a link (with optional comments) with the site community or network
      • Translate - A service that translates the current webpage or user-selection from one language to another
    Choosing a descriptive category is important for how Accelerators are grouped in the accelerator menu, and enables users to understand what your Accelerator will do before even experimenting with it.
  5. Choose which contexts you want your Accelerator operate on—“selection”, “link”, and/or “document”—and then add them as attributes to one or more elements. For example:
    The link and document contexts could probably use a little extra explanation. The link context is activated when a user right-clicks on a link and then executes an accelerator from the resulting context menu. Similarly, the document context is activated when the user right-clicks on the page itself and uses the context menu, or goes to the Page menu and executes something under the “All Accelerators” submenu.
  6. Next, fill in the “action” attribute of the element with the URL of the service you want to use. See the section below regarding variables to find out how to pass data into your service.
  7. Preview windows are a great way of delivering the output of a service to users as part of a more inline browsing experience—it’s also a great way of enticing them to visit a service’s home page.

    You can add a preview window via the element. I’ve written a section about preview below.
The sections that follow provide some more in-depth specifics about the steps above.


IE exposes a number of variables for use with Accelerators. Here’s a list of the most commonly used variables:
  • {selection} - the user selection within the webpage. Only available in selection context.
  • {documentUrl} - the URL of the webpage where the Accelerator is invoked.
  • {documentTitle} - represents the title of the webpage where the Accelerator is invoked.
  • {link} - the URL of the user selected URL.
  • {linkText} - the text of the user selected URL.
A full list of variables is available here.

There are two methods of passing these variables to a service through an Accelerator. The first is through the query string:

The second is through one or more tags:

Note that using a element is the only way to insert data into the body of the HTTP request. You can use POST with a parameterized query string, as well, but any parameters you pass will show up in the URL. You can specify a GET or POST request via the “method” attribute of the element.

Adding Preview

Preview is probably the most visible feature of Accelerators, and one of the most useful when implemented effectively.

Accelerator previews occupy a window of size 320x240 pixels. Given this, most Accelerators that use it create a special preview page for displaying it.

The key to an effective preview is returning the most relevant information possible based on the information sent by the user, then making sure it fits in the space provided by the preview window.

The Bing Maps Accelerator, for example, maps the location of a selected address using its own UI, scaled down to 320x240:

Note that you can pass variables to the preview window the same way you can for execution. For example, the Accelerator above uses {selection}.

Another handy rule of thumb is load time—if it takes your preview window takes more than half a second to load, you probably have too much in it, from a user experience perspective.

One trick that you might find useful involves using the mobile version of a service for a preview window. We deliberately sized the preview window to be compatible with mobile services.

Testing your Accelerator

Once you’re done building your Accelerator, it’s time to test it out. We have a Javascript API for installation. Some code like the following will create a link that brings up the Accelerator installation dialog:
Install me

In order for this to work, you’ll need a live web server—trying to open the link from a page on your local hard drive will result in an error. Any kind of local server will work fine, though—you can use Visual Studio’s ASP.NET server without issue, for example.

If everything goes well, you’ll see the normal Accelerator installation dialog. If it doesn’t, you’ll see something like this:

Whenever I see this dialog, there are a couple of mistakes that very frequently turn out to be the culprits.

Encoded Characters

The first has to do with XML itself. When dealing with query strings, it’s very common to pass in multiple arguments using the ampersand character. Unfortunately, this is a reserved character in XML, so using it as a literal in a query string will raise an error. Instead, you’ll need to escape it with “&”, like this:

Matching Domain Requirement

The second has to do with the tag. To properly identify a service, we require that the URLs specified in , the action attribute of , and the action attribute of all share the same domain. If this isn’t the case, an error is raised.

Test Cases

Once you can install your Accelerator, there are a few scenarios you should definitely test, since they tend to break for a lot of the Accelerators already out there:
  • Blank content – what happens when blank content is sent to your service? Do you have a graceful error message in place?
  • Multi-line content – does your service handle line-breaks the way you think it will? You may want to make sure you parse for the carriage return-line feed sequence (“%0d%0a” in URL encoding) and replace it with something appropriate, like a space.
  • Script – Some user selection may have JavaScript associated with it. If you specify HTML selection, then your service should be filtering this script on the server for security reasons.
  • Large selections – Accelerators truncate GET requests at 2048 characters. If you’d like your accelerator to be able to handle more data, you might consider using POST.
Next Steps and Conclusion

Once you have a cool Accelerator built, feel free to upload it to the IE Gallery. It’s a great way to gain more exposure for your Accelerator and your service.

I hope this post was helpful in creating Accelerators. If you have any feedback on this post, any thoughts on Accelerators in general, or any cool creations you’d like to share, feel free to leave a comment.

Jon Seitel
Program Manager


My System SpecsSystem Spec

24 Dec 2009   #2

Win 7 Pro x64, VM Win XP, Win7 Pro Sandbox, Kubuntu 11

Good piece, thanks "Oddball".
My System SpecsSystem Spec

 Accelerator Creation Guide

Thread Tools

Similar help and support threads
Thread Forum
Accelerator add-ons quit working
This actually happened after the June updates, just didn't take time to post about it. I used to be able to highlight a word & choose either Wikipedia (default) or a dictionary to read the meaning of it but it doesn't work anymore. Those 2 are still listed in my add-ons. How can I find out what...
Browsers & Mail
Recent oddity when trying to use accelerator
Quite often while reading a post, I use wikipedia accelerator to find definition of a word. It's worked fine until about the last month or so, now it frequently tells me it's not available & leaves a blank tab which won't close until I close out of SF first. I don't believe I've made any change to...
Browsers & Mail
hardware accelerator
Hello i need help, i cant seem to play game on my windows 7 any time i try i get a box poping out notifing me: THIS GAME IS RUNNING IN A SOFTWARE RENDDERING MODE and then it says hardware acceleration is either disabled or your video card does not support... Pls install a new version or games wld...
Graphic Cards
Graphics accelerator stopped and recovered !!!
I,m trying to run a Karaoke program on my laptop.....but when I connect it to my tv ......after a while I get an error that says "Graphics card accellerator stopped working and recovered.....can any one tell me what this means..... And it,s followed by an error box that says..... Device manager...
Graphic Cards
Anybody using any WAN Accelerator Devices?
Just wondered if anybody was using any WAN accelerator and what you thought of them. I've been testing some units from; 1). Riverbed: SteelHead 1050H's 2). Silver Peak: NX-3600's Just trying to determine which device provides my company with best bang for the buck. So, I've been...
Chillout Room
Hardware Accelerator?
I think this is the right section for this question, but if it's not I apologize. I have an ATI Mobility Radeon HD 4500 Series video card. I am trying to take screen captures of a PC game. It was working previously, but now I am just getting a black screen and I don't know why. I certainly...
Graphic Cards

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 09:12.

Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App