views:

229

answers:

2

I need it for my firefox extension. I don't care about waiting the page load completely, I want only observe URL and get an event every time it changes, also when I do history back and forward.

edit: I saw An observer for URL changes (Firefox Extension), but i wondering if there is something much simpler, like an event that fires every time the url is part of an action, like page request, history back and forward ecc..

A: 

SWFAddress has a Javascript library that lets you do just that.

Matti
+1  A: 

https://developer.mozilla.org/en/Code_snippets/Progress_Listeners#Example.3a_Notification_when_the_value_in_Address_Bar_changes

Also http://stackoverflow.com/questions/2060779/how-can-i-check-if-url-of-current-browser-tab-is-changed

Nickolay
Thanks Nickolay, that's what i was looking for.
Manuel Bitto
If someone have the same problem, i found another solution, it's more quik and maybe less "professional", but it works: use DOMTitleChanged event. It's fired every time the content of browser change, including history back and forward and new tabs.
Manuel Bitto