Re: favicon of address
As not everybody like the nasty ico file format, some web developer are nice enough to use 32 bits PNG. link rel=icon type=image/png href=/favicon.png/ So, without page content, I don't see how you would now where the favicon is. Le 21 sept. 2009 à 01:11, Mike Abdullah a écrit : The best engineered approach would probably be to load the page up into a WebView, BUT use the WebResourceLoadDelegate to stop it wasting time downloading any resource that isn't the favicon. But if it isn't critical, then downloading favicon.ico should probably be enough. On 20 Sep 2009, at 19:53, Mitchell Livingston wrote: Hey, I want to get the favicon of a URL address, but don't actually need any of the page's content. Is there an efficient way to do this besides hammering the site for this info? This image isn't critical, so something that works most of the time should be fine. Thanks, Mitch ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net This email sent to cocoa...@mikeabdullah.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/devlists%40shadowlab.org This email sent to devli...@shadowlab.org -- Jean-Daniel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: favicon of address
The best engineered approach would probably be to load the page up into a WebView, BUT use the WebResourceLoadDelegate to stop it wasting time downloading any resource that isn't the favicon. WebView has a lot of overhead! It would be much more efficient to just use NSXMLDocument to download and parse the HTML. Using the XPath accessor methods in NSXML you can very easily search for that particular link and extract its URL. It shouldn't take more than three or four lines of code if you don't mind doing it synchronously; if you want async, then use an NSURLRequest to download the HTML and pass the resulting data to NSXMLDocument. —Jens___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
favicon of address
Hey, I want to get the favicon of a URL address, but don't actually need any of the page's content. Is there an efficient way to do this besides hammering the site for this info? This image isn't critical, so something that works most of the time should be fine. Thanks, Mitch ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: favicon of address
I've been spending the past couple days working on webservers, and I've noticed that the first time that the browser requests a page, it also requests /favicon.ico, no matter what page in the file hierarchy it's trying to GET. From there, it would seem like if you have a host name (http://www.example.com ), you can just execute a URLRequest for /favicon.ico, and you should be good to go (most of the time). HTH, Dave On Sep 20, 2009, at 12:53 PM, Mitchell Livingston wrote: Hey, I want to get the favicon of a URL address, but don't actually need any of the page's content. Is there an efficient way to do this besides hammering the site for this info? This image isn't critical, so something that works most of the time should be fine. Thanks, Mitch ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: favicon of address
On Sep 20, 2009, at 1:53 PM, Mitchell Livingston wrote: Hey, I want to get the favicon of a URL address, but don't actually need any of the page's content. Is there an efficient way to do this besides hammering the site for this info? This image isn't critical, so something that works most of the time should be fine. This isnt really a Cocoa question, so you're asking the wrong list. That said, a large majority of sites still store favicons at / favicon.ico, so you can just try to download that URL and hope for the best. Otherwise you have to get the page content and look for the link element that specifies the correct favicon url. See http://en.wikipedia.org/wiki/Favicon Jason smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: favicon of address
The best engineered approach would probably be to load the page up into a WebView, BUT use the WebResourceLoadDelegate to stop it wasting time downloading any resource that isn't the favicon. But if it isn't critical, then downloading favicon.ico should probably be enough. On 20 Sep 2009, at 19:53, Mitchell Livingston wrote: Hey, I want to get the favicon of a URL address, but don't actually need any of the page's content. Is there an efficient way to do this besides hammering the site for this info? This image isn't critical, so something that works most of the time should be fine. Thanks, Mitch ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net This email sent to cocoa...@mikeabdullah.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com