Hey all, I’ve got a few questions about WebViews that I’ve not been able to find the answers to yet! If anyone here has the answers to one or many of the questions, I’d be grateful!
-
Where are cache files stored? It seems that my apps with WebViews store things in a different cache from Safari. While this does make a degree of sense, how does one clear said cache at a fresh launch of the app (if not on demand!)?
-
Can one append an identifier to the user agent string? I’d love to be able to identify the source of hits from my apps. e.g. adding “(lewellyn’s super-duper thinger!)” to the UA.
-
Can one programatically (preferably via pure AppleScript) either reinstantiate the WebView, or clear the history for it? When I “recycle” the WebView, I don’t want the previous history to be available.
-
Can one actually allow Flash-based popups to create new windows somehow? AFAICT, I selected the proper item in IB, but I can’t actually get Flash objects which spawn a new browser window (e.g. to display a standard “purchase” screen) to actually do so. I’d be satisfied with re-using a single window over and over again, if necessary. (Subject to #3, above.)
-
In relation to #4, is there a way to allow a Flash object to close the window? They work fine in Safari for the purpose, but I’m not sure what connection(s) would need to be made for a WebView. I suspect some ObjC in my future.
(I’ve been trying to stay pure AppleScript, but I suppose that once an app hits .5K LOC you start needing to extend it externally. And, if I get answers to all the above, who knows if I may end up at 1K! So much for what started out as “let’s dynamically create a web page and feed it to Safari!” :lol:)
Any and all feedback is most appreciated. I can elaborate on any of the points, if need be. But, I suspect that my desires are obvious enough from each of the above. I’m not looking to add complexity to my app; indeed, this should actually serve to reduce complexity on the user end!
And if any of the above points above have been beaten like a dead horse, previously, I’d appreciate links. I certainly didn’t find any! (And I’m still trying to fight with the ADC docs. For some reason, I find them hard to grok; I suspect it’s my Unixy roots. I never really “got” them in the “Classic” days, either.)