My friend wants me to turn his Cocoa application into a firefox plugin. The application takes the URL of the site where the data is to be downloaded from, and downloads it, taking the load off of the browser. My question is, since firefox plugins are written in javascript (I think), and the application is written in objective C, is this even possible? Also, is there any advantage to downloading a file from someplace else, as to not interfere with other web-browsing? Will the browsing still be slow because the internet connection is being used? Is there any possible advantage this could have?
Thanks guys! 🙂
Actually Firefox plugins (such as Flash, Java and video codec support) are mostly written in C and/or C++, not Javascript.
You should not confuse the plugins with the Firefox add-ons (it’s the latter that are written in Javascript).
You can use Objective-C to code a Firefox plugin, as long as your plugin is binary compatible with the Firefox Plugin API interface.
Here are some instructions about how to setup this.
Yes, there is. A separate download manager program can do additional clever stuff with downloading that Firefox does not do (like automatically opening multiple download connections, having a searchable download history, automatically adding downloaded files to specific folders based on file types, etc). Take a look at Speed Download for an example of some of the options.
(You could also implement most of this stuff with a Firefox add-on (such as this), but native code is always more integrated and flexible).
The total bandwidth of the connection is shared by all running applications, so having another app download stuff wont help you in this area. However, this arrangement will offload the browser of having to deal with the open download connections, so the browser could theoretically be a little snappier.