<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: URL filtering for UIWebView on the iPhone</title>
	<atom:link href="http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/</link>
	<description>iCab related stuff; Mac, iPhone and Cocoa programming</description>
	<lastBuildDate>Fri, 03 Feb 2012 21:00:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Peter Bauer</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-2/#comment-15328</link>
		<dc:creator>Peter Bauer</dc:creator>
		<pubDate>Wed, 14 Sep 2011 11:13:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-15328</guid>
		<description>It does not detect calls of MPVideoController</description>
		<content:encoded><![CDATA[<p>It does not detect calls of MPVideoController</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Schiefer</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-2/#comment-14053</link>
		<dc:creator>David Schiefer</dc:creator>
		<pubDate>Thu, 21 Jul 2011 22:35:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-14053</guid>
		<description>Yes I know that - but maybe we should replace it with a transparent image...will play with this a bit and will let you know of any updates.</description>
		<content:encoded><![CDATA[<p>Yes I know that &#8211; but maybe we should replace it with a transparent image&#8230;will play with this a bit and will let you know of any updates.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-2/#comment-14044</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Thu, 21 Jul 2011 13:26:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-14044</guid>
		<description>@David Schiefer
This is because the &quot;?&quot; is the standard replacement icon for missing or damaged image files. And because the filters do block these image files the iOS draws the replacement icon now. When the filter blocks non-image files, like JavaScript etc, you won&#039;t get the replacement icons, because then the missing file is not an image file, or because the blocked JavaScript file can no longer create the IMG tags and so there&#039;s no replacement icon.</description>
		<content:encoded><![CDATA[<p>@David Schiefer<br />
This is because the &#8220;?&#8221; is the standard replacement icon for missing or damaged image files. And because the filters do block these image files the iOS draws the replacement icon now. When the filter blocks non-image files, like JavaScript etc, you won&#8217;t get the replacement icons, because then the missing file is not an image file, or because the blocked JavaScript file can no longer create the IMG tags and so there&#8217;s no replacement icon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Schiefer</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-2/#comment-14042</link>
		<dc:creator>David Schiefer</dc:creator>
		<pubDate>Thu, 21 Jul 2011 11:36:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-14042</guid>
		<description>This works on many websites, but for example on nytimes.com no banners are shown, but I get a &quot;?&quot; icon in the place where they used to be. Why is this?</description>
		<content:encoded><![CDATA[<p>This works on many websites, but for example on nytimes.com no banners are shown, but I get a &#8220;?&#8221; icon in the place where they used to be. Why is this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-2/#comment-10938</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Sat, 09 Apr 2011 11:55:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-10938</guid>
		<description>@waiwaier
The filter method I&#039;ve described here is based on the URL only. So it will work for https as well, but you can not filter based on the content that is received or sent this way.</description>
		<content:encoded><![CDATA[<p>@waiwaier<br />
The filter method I&#8217;ve described here is based on the URL only. So it will work for https as well, but you can not filter based on the content that is received or sent this way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: waiwaier</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-2/#comment-10936</link>
		<dc:creator>waiwaier</dc:creator>
		<pubDate>Sat, 09 Apr 2011 11:11:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-10936</guid>
		<description>Is it possible to filter the https data and the data posted to server?</description>
		<content:encoded><![CDATA[<p>Is it possible to filter the https data and the data posted to server?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Huang</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-1/#comment-10821</link>
		<dc:creator>Jim Huang</dc:creator>
		<pubDate>Wed, 06 Apr 2011 07:30:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-10821</guid>
		<description>Why i always failed to post my comment? Great post, thanks Alexander .</description>
		<content:encoded><![CDATA[<p>Why i always failed to post my comment? Great post, thanks Alexander .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-1/#comment-8588</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Thu, 03 Feb 2011 15:03:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-8588</guid>
		<description>@KH
Yes and no :-) You can&#039;t stream it directly from the local resource, but you could save the data of the local resource in the cache if it is not yet in the cache. And then just return the cached data. This way you don&#039;t need to load the data from the internet and  can feed UIWebView with your local data instead.</description>
		<content:encoded><![CDATA[<p>@KH<br />
Yes and no <img src='http://www.icab.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  You can&#8217;t stream it directly from the local resource, but you could save the data of the local resource in the cache if it is not yet in the cache. And then just return the cached data. This way you don&#8217;t need to load the data from the internet and  can feed UIWebView with your local data instead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KH</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-1/#comment-8585</link>
		<dc:creator>KH</dc:creator>
		<pubDate>Thu, 03 Feb 2011 13:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-8585</guid>
		<description>Alexander, Great post. 

Question: Would it be possible to stream contents from a local resource embedded into the application as the response? Let&#039;s say there is a javascript (Resource/abc.js) file that is in the application &quot;Resource&quot; and if the UIWebView page requests for this file, stream it from the local resource instead of getting the file remotely?</description>
		<content:encoded><![CDATA[<p>Alexander, Great post. </p>
<p>Question: Would it be possible to stream contents from a local resource embedded into the application as the response? Let&#8217;s say there is a javascript (Resource/abc.js) file that is in the application &#8220;Resource&#8221; and if the UIWebView page requests for this file, stream it from the local resource instead of getting the file remotely?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-1/#comment-6457</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Thu, 09 Dec 2010 22:15:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-6457</guid>
		<description>@JC
If you overwrite the method &quot;storeCachedResponse:forRequest:&quot; of the NSURLCache class, you&#039;ll get the data of the files of a web page while it is loaded. The data can be retrieved from the &quot;cached Response&quot; argument.</description>
		<content:encoded><![CDATA[<p>@JC<br />
If you overwrite the method &#8220;storeCachedResponse:forRequest:&#8221; of the NSURLCache class, you&#8217;ll get the data of the files of a web page while it is loaded. The data can be retrieved from the &#8220;cached Response&#8221; argument.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JC</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-1/#comment-6446</link>
		<dc:creator>JC</dc:creator>
		<pubDate>Thu, 09 Dec 2010 16:42:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-6446</guid>
		<description>Are you using a variation on this method with NSURLCache to save pages for &quot;offline viewing?&quot;    Was wondering how to store the contents of a web page without having to reload each element of the page (and parse through and determine all of the images, .cs, .js etc).</description>
		<content:encoded><![CDATA[<p>Are you using a variation on this method with NSURLCache to save pages for &#8220;offline viewing?&#8221;    Was wondering how to store the contents of a web page without having to reload each element of the page (and parse through and determine all of the images, .cs, .js etc).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-1/#comment-5754</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Sun, 21 Nov 2010 21:09:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-5754</guid>
		<description>@david
If your FilterURLCache methods are called then the filter should work just fine. Please note that the UIWebView object also uses memory caches, so as long as a certain image is still in the memory cache, it is still displayed. Which means if you create a filter after a web page was loaded, almost everything of the web site will be in the memory cache and displayed even when you load the page again afterwards. Also using the &quot;reload&quot; method of the UIWebView object will always bypass the FilterURLCache.

Also make sure you create the new cache and configure it as a new default cache before you&#039;re loading web pages within your UIWebView.</description>
		<content:encoded><![CDATA[<p>@david<br />
If your FilterURLCache methods are called then the filter should work just fine. Please note that the UIWebView object also uses memory caches, so as long as a certain image is still in the memory cache, it is still displayed. Which means if you create a filter after a web page was loaded, almost everything of the web site will be in the memory cache and displayed even when you load the page again afterwards. Also using the &#8220;reload&#8221; method of the UIWebView object will always bypass the FilterURLCache.</p>
<p>Also make sure you create the new cache and configure it as a new default cache before you&#8217;re loading web pages within your UIWebView.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-1/#comment-5747</link>
		<dc:creator>david</dc:creator>
		<pubDate>Sun, 21 Nov 2010 17:45:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-5747</guid>
		<description>Hey, can someone provide an example or something that has successfully set this up on IPhone. My UIWebView continues to load everything even though my FilterURLCache tells it not too which is being called, its just not doing anything.

Thanks</description>
		<content:encoded><![CDATA[<p>Hey, can someone provide an example or something that has successfully set this up on IPhone. My UIWebView continues to load everything even though my FilterURLCache tells it not too which is being called, its just not doing anything.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-1/#comment-4960</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Mon, 25 Oct 2010 13:53:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-4960</guid>
		<description>If the image is so big that it can not be loaded/decoded without running out of memory, than you can not do anything here. The only choice would be to reduce the size of the image that is embedded. And the important size is the dimension (width and height) of the image, not the file size. 

A rough estimate about the final memory requirement for an image is    width * height * 4  Bytes (each pixels takes one byte for red, green, blue and the alpha channel). So if an image is 1000*4000 pixels large, it needs about  16 MB of RAM. While decoding the image, additional buffers might need additional memory. 

If you deal with images yourself, make sure that you release images you don&#039;t need anymore as soon as possible. Don&#039;t rely on the default autorelease pools to clean up the memory, when you&#039;re creating lots of temporary objects in loops. The default autorelease pools can do their work only after your delegate and action methods have given control back the the system. In general make sure that you don&#039;t forget to release or autorelease objects you&#039;ve created.</description>
		<content:encoded><![CDATA[<p>If the image is so big that it can not be loaded/decoded without running out of memory, than you can not do anything here. The only choice would be to reduce the size of the image that is embedded. And the important size is the dimension (width and height) of the image, not the file size. </p>
<p>A rough estimate about the final memory requirement for an image is    width * height * 4  Bytes (each pixels takes one byte for red, green, blue and the alpha channel). So if an image is 1000*4000 pixels large, it needs about  16 MB of RAM. While decoding the image, additional buffers might need additional memory. </p>
<p>If you deal with images yourself, make sure that you release images you don&#8217;t need anymore as soon as possible. Don&#8217;t rely on the default autorelease pools to clean up the memory, when you&#8217;re creating lots of temporary objects in loops. The default autorelease pools can do their work only after your delegate and action methods have given control back the the system. In general make sure that you don&#8217;t forget to release or autorelease objects you&#8217;ve created.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Polo</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-1/#comment-4958</link>
		<dc:creator>Polo</dc:creator>
		<pubDate>Mon, 25 Oct 2010 13:30:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-4958</guid>
		<description>Hello! You this article is too great! I have a problem, hoping to get your help! So I would be very grateful! Is the case, I use UIWebView embedded in a web page, but the page inside the image is too big to As for my memory is increasing, and the final crash! you help me solve this problem? Thank you!</description>
		<content:encoded><![CDATA[<p>Hello! You this article is too great! I have a problem, hoping to get your help! So I would be very grateful! Is the case, I use UIWebView embedded in a web page, but the page inside the image is too big to As for my memory is increasing, and the final crash! you help me solve this problem? Thank you!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

