Adding entries to Internet Explorer’s user-agent string

Posted: December 19, 2007 in Internet Explorer
Tags: , , ,

If you regularly develop extensions to IE (like I do), at some point you’ll need (or want) to extend the user-agent header string that IE sends up to web servers.  Fortunately, all you have to do is put a few entries in the registry.

Let’s say you want to add the token “MyIEExtension 1.0.0.0″ to IE’s user-agent string for the current user. Just enter it as the name of a string value (without the quotes, of course) under the registry key:

HKEY_CURRENT_USER\

    SOFTWARE\

        Microsoft\

            Windows\

                CurrentVersion\

                    Internet Settings\

                        User Agent\

                            Post Platform

If you want the token to be added to all users, use the same path except put it under HKEY_LOCAL_MACHINE.

Want to know more? Go to “Understanding User-Agent Strings” at MSDN.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s