Suppress plugin loading in WebKit

前端 未结 1 1726
执笔经年
执笔经年 2021-01-18 12:45

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 als

1条回答
  •  一生所求
    2021-01-18 13:10

    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.

    0 讨论(0)
提交回复
热议问题