3

I'm thinking about writing a browser plugin, but I don't know any C. Can I write browser plugins with Java or Python?

I was thinking... All those websites store cookies on my browser to identify me. If I wrote a plugin that would supply a browser GUID in the http headers, webservers could identify the browser.

I think that would rule out the need for 99% of all the cookies, pretending for a moment that all users and servers use it.

Pepijn
  • 4,145
  • 5
  • 36
  • 64
  • 7
    Pretending that all users would install your plugin is way too much. Not even Java or Flash have an install base that large. Even pretending that 1% of people would install it is quite too far. Besides, with the concerns upon privacy, most people wouldn't want a GUID being sent on every request... I surely wouldn't. – Miguel Ventura Jan 29 '10 at 17:37
  • Interesting idea. A GUID isn't perfect; it can be spoofed. Someone could use your MAC address and knowledge of the last GUI you created to generate GUID's that would appear to be you. – S.Lott Jan 29 '10 at 18:03
  • 1
    Being able to uniquely identify the browser is probably the main thing people don't like about cookies. – Laurence Gonsalves Jan 29 '10 at 18:04
  • I wasn't really planning on getting everyone to use it, just sort of a proof of concept. I was just thinking about a way to do what cookies do without cookies. Most cookies just contain some sort of session ID, if I could replace that with one global ID... That would be just as easy to spoof as a session ID I think. You could include some sort of policy like cookie managers to decide which website may access the GUId or store a cookie. – Pepijn Jan 30 '10 at 10:24

1 Answers1

1

You can certainly write an ActiveX plugin for IE in Python using the win32com interfaces. But you'd have to install Python and pywin32 along with your plugin for it to work, so it'd be pretty bulky. I don't think it's going to be popular to install all that just to get a GUID.

(Actually most people specifically don't want a GUID. Is that really your only aim? If you're thinking about single-sign-on options, look at systems like OpenID as used on SO... this gives the user much greater control.)

bobince
  • 528,062
  • 107
  • 651
  • 834
  • I use Mac, so that is not an option. I'm not sure if PyObjC can do this... Maybe I should learn C or XUl for Firefox. – Pepijn Jan 30 '10 at 10:27
  • 1
    Writing an add-on with XUL and JavaScript would be the path of least resistance, if you only need to support Firefox. Add-ons are much less hassle than actual plugins. – bobince Jan 30 '10 at 12:21