zoukankan      html  css  js  c++  java
  • ios webview清除缓存

    UIWebView清除Cookie:

    复制代码
    //清除cookies
    NSHTTPCookie *cookie;
    NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
    for (cookie in [storage cookies]) 
    {
        [storage deleteCookie:cookie];
    }
    复制代码

    UIWebView清除缓存:

    //清除UIWebView的缓存
    [[NSURLCachesharedURLCache] removeAllCachedResponses];

    (By ItNoob.Matrix 链接 http://www.cnblogs.com/ItNoob)

    分类: ios
    [cpp] view plaincopy
     
     
    1. NSURLCache * cache = [NSURLCache sharedURLCache];  
    2.     [cache removeAllCachedResponses];  
    3.     [cache setDiskCapacity:0];  
    4.     [cache setMemoryCapacity:0];  
  • 相关阅读:
    网络IO
    进程与线程
    计算机网络
    操作系统
    刷题笔记
    fasd
    线程池
    epoll反应堆
    read函数
    dup与dup2
  • 原文地址:https://www.cnblogs.com/gaohe/p/4537820.html
Copyright © 2011-2022 走看看