• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Mapping NSURLRequests to NSCachedURLResponses for WebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mapping NSURLRequests to NSCachedURLResponses for WebView


  • Subject: Mapping NSURLRequests to NSCachedURLResponses for WebView
  • From: Edison Thomaz <email@hidden>
  • Date: Sun, 8 Feb 2004 23:48:16 -0800

Hi everyone,

I am trying to control the caching behavior of a WebView, but I am having some trouble... Here's the scenario... Imagine you are going on a plane trip and you want to have with you the freshest content of your favorite web sites. Now imagine that you have an application that goes to your favorite web sites, downloads all the content and pushes everything into the cache of a WebView, so that you don't have to do that work yourself - by going to a bunch of sites and saving the pages to your desktop. I want to write an application with this same level of control over the cache - essentially mapping NSURLRequests (the requests to web sites) to NSCachedURLResponse (the content of the web sites) items in the sharedURLCache.

The problem is that it looks like this is not so simple, if this small thread is any indication:

http://cocoa.mamasam.com/COCOADEV/2003/07/1/68281.php

In the thread, Scott Anguish mentions that an option is to subclass NSURLProtocol.....

Does anyone have any experience with this? The code listed in the thread above seems to be doing all the right work, too bad it's not so simple to manipulate the NSURLCache and make it work together with a WebView. Any help would be greatly appreciated.

Thanks!

Edison Thomaz
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: XCode: /usr VS /usr/local
  • Next by Date: Re: Using NSTableView and NSBrowser without callbacks ?
  • Previous by thread: XCode: /usr VS /usr/local
  • Next by thread: NSView subclass + manual binding
  • Index(es):
    • Date
    • Thread