How do I refresh Application metadata - URL handlers, Web browsers - after installing my own AppleScript?
If you saved your AppleScript as application and declared that it can handle the http and https URL scheme in its Info.plist file, you simply need to update its modification date e.g. by running touch "My Program.app" in Terminal, or moving it to a different folder and back again in Finder.

Launch Services will then pick up the change automatically. You will need to restart Safari to update the browser list.