tags:

views:

143

answers:

1

Hi,

My app uses WebKit to display previews of web, and I want to suppress plugins such as the Acrobat one from loading, mainly because of the unreliability it can cause, but also for UI reasons.

I know I can use [WebPreferences setPlugInsEnabled:] to disable plugins, but I really want to do it on a case-by-case basis, i.e. Acrobat Disabled, Flash enabled, etc...

Is this possible?

Cheers!

MT

+1  A: 

I don't believe you have direct hooks to the plugins (particularly Netscape-style plugins), but there's another solution that is probably more appropriate and will save your user's download bandwidth. Implement WebPolicyDelegate's webView:decidePolicyForMIMEType:request:frame:decisionListener:. If it is a distasteful MIME type, send -ignore to the listener.

Rob Napier
This sounds worth a go, thanks! The main reason I want to do this is that my users have reported crashes involving the Acrobat plugin, so I'd rather not load it at all.
MT