diff --git a/EVURLCache.podspec b/EVURLCache.podspec index 84da8fd..c79993c 100644 --- a/EVURLCache.podspec +++ b/EVURLCache.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| # s.name = "EVURLCache" -s.version = "2.2.1" +s.version = "2.3.0" s.summary = "NSURLCache subclass for handeling all web requests that use NSURLRequest" s.description = "This is a NSURLCache subclass for handeling all web requests that use NSURLRequest. (This includes UIWebView)" s.homepage = "https://github.com/evermeer/EVURLCache" diff --git a/EVURLCache.xcodeproj/project.pbxproj b/EVURLCache.xcodeproj/project.pbxproj index 67ca773..4a4fdc3 100644 --- a/EVURLCache.xcodeproj/project.pbxproj +++ b/EVURLCache.xcodeproj/project.pbxproj @@ -425,7 +425,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -464,7 +464,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/EVURLCache/AppDelegate.swift b/EVURLCache/AppDelegate.swift index c649d5a..2eaadc9 100644 --- a/EVURLCache/AppDelegate.swift +++ b/EVURLCache/AppDelegate.swift @@ -26,7 +26,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { EVURLCache.FORCE_LOWERCASE = true // is already the default. You also have to put all files int he PreCache using lowercase names // Now activate this cache EVURLCache.activate() - + NSLog("Cache is now active") return true } diff --git a/EVURLCache/Pod/EVURLCache.swift b/EVURLCache/Pod/EVURLCache.swift index 4d1abc4..6ac3588 100644 --- a/EVURLCache/Pod/EVURLCache.swift +++ b/EVURLCache/Pod/EVURLCache.swift @@ -28,7 +28,8 @@ public class EVURLCache : NSURLCache { public static var FORCE_LOWERCASE = true // Set this to false if you want to use case insensitive filename compare public static var _cacheDirectory: String! public static var _preCacheDirectory: String! - + public static var RECREATE_CACHE_RESPONSE = true // There is a difrence between unarchiving and recreating. I have to find out what. + // Activate EVURLCache public class func activate() { // set caching paths @@ -102,7 +103,17 @@ public class EVURLCache : NSURLCache { // Read object from file if let response = NSKeyedUnarchiver.unarchiveObjectWithFile(storagePath) as? NSCachedURLResponse { EVURLCache.debugLog("Returning cached data from \(storagePath)"); + + // I have to find out the difrence. For now I will let the developer checkt which version to use + if EVURLCache.RECREATE_CACHE_RESPONSE { + // This works for most sites, but aperently not for the game as in the alternate url you see in ViewController + let r = NSURLResponse(URL: response.response.URL!, MIMEType: response.response.MIMEType, expectedContentLength: response.data.length, textEncodingName: response.response.textEncodingName) + return NSCachedURLResponse(response: r, data: response.data, userInfo: response.userInfo, storagePolicy: .Allowed) + } + // This works for the game, but not for my site. return response + } else { + EVURLCache.debugLog("The file is probably not put in the local path using NSKeyedArchiver \(storagePath)"); } return nil } diff --git a/EVURLCache/ViewController.swift b/EVURLCache/ViewController.swift index 0af7ad0..cc8200c 100644 --- a/EVURLCache/ViewController.swift +++ b/EVURLCache/ViewController.swift @@ -16,8 +16,11 @@ class ViewController: UIViewController { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. - // An other nice test url is: http://game.zorropk.com/gamenow/xiao5haiyanglixianji/ + // Uncomment the 2 lines below and comment the line below that to see an other nice test +// EVURLCache.RECREATE_CACHE_RESPONSE = false +// if let url = NSURL(string: "http://game.zorropk.com/gamenow/xiao5haiyanglixianji/") { if let url = NSURL(string: "http://evict.nl") { + NSLog("navigating to \(url)") webView.loadRequest(NSURLRequest(URL: url)) } } diff --git a/PreCache/evict.nl/edwin_vermeer/status/index.html b/PreCache/evict.nl/edwin_vermeer/status/index.html new file mode 100644 index 0000000..5b0f362 Binary files /dev/null and b/PreCache/evict.nl/edwin_vermeer/status/index.html differ diff --git a/PreCache/evict.nl/index.html b/PreCache/evict.nl/index.html index 6e0c75e..6bbc4d5 100644 Binary files a/PreCache/evict.nl/index.html and b/PreCache/evict.nl/index.html differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/genericons/genericons/genericons.css b/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/genericons/genericons/genericons.css new file mode 100644 index 0000000..faed25e Binary files /dev/null and b/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/genericons/genericons/genericons.css differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/genericons/genericons/genericons.svg b/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/genericons/genericons/genericons.svg new file mode 100644 index 0000000..a90893a Binary files /dev/null and b/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/genericons/genericons/genericons.svg differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/jquery.spin.js b/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/jquery.spin.js index 1e901ca..b55bc93 100644 Binary files a/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/jquery.spin.js and b/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/jquery.spin.js differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/spin.js b/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/spin.js index c66c607..6b1caa4 100644 Binary files a/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/spin.js and b/PreCache/evict.nl/wp-content/plugins/jetpack/_inc/spin.js differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/css/jetpack.css b/PreCache/evict.nl/wp-content/plugins/jetpack/css/jetpack.css index de1ee8b..f7bd700 100644 Binary files a/PreCache/evict.nl/wp-content/plugins/jetpack/css/jetpack.css and b/PreCache/evict.nl/wp-content/plugins/jetpack/css/jetpack.css differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/carousel/jetpack-carousel.js b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/carousel/jetpack-carousel.js index da61a86..de74cc6 100644 Binary files a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/carousel/jetpack-carousel.js and b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/carousel/jetpack-carousel.js differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/infinite-scroll/infinity.js b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/infinite-scroll/infinity.js index 21df3cc..bb93e08 100644 Binary files a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/infinite-scroll/infinity.js and b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/infinite-scroll/infinity.js differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/photon/photon.js b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/photon/photon.js index 0485d85..24fb9e6 100644 Binary files a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/photon/photon.js and b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/photon/photon.js differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/sharedaddy/images/loading.gif b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/sharedaddy/images/loading.gif new file mode 100644 index 0000000..4e9048d Binary files /dev/null and b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/sharedaddy/images/loading.gif differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/sharedaddy/sharing.js b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/sharedaddy/sharing.js new file mode 100644 index 0000000..3dd1c6a Binary files /dev/null and b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/sharedaddy/sharing.js differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/shortcodes/js/jquery.cycle.js b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/shortcodes/js/jquery.cycle.js index d12df1b..52d2ae5 100644 Binary files a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/shortcodes/js/jquery.cycle.js and b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/shortcodes/js/jquery.cycle.js differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js index 8d10d69..8bef60d 100644 Binary files a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js and b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js differ diff --git a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/wpgroho.js b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/wpgroho.js index 07a78b1..a9ec8e0 100644 Binary files a/PreCache/evict.nl/wp-content/plugins/jetpack/modules/wpgroho.js and b/PreCache/evict.nl/wp-content/plugins/jetpack/modules/wpgroho.js differ diff --git a/PreCache/evict.nl/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/src/shcore.js b/PreCache/evict.nl/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/src/shcore.js index 987706f..b05400b 100644 Binary files a/PreCache/evict.nl/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/src/shcore.js and b/PreCache/evict.nl/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/src/shcore.js differ diff --git a/PreCache/evict.nl/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/shcore.css b/PreCache/evict.nl/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/shcore.css index 62e8151..71b5be5 100644 Binary files a/PreCache/evict.nl/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/shcore.css and b/PreCache/evict.nl/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/shcore.css differ diff --git a/PreCache/evict.nl/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/shthemedefault.css b/PreCache/evict.nl/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/shthemedefault.css index a4b2f82..da6b22e 100644 Binary files a/PreCache/evict.nl/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/shthemedefault.css and b/PreCache/evict.nl/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/shthemedefault.css differ diff --git a/PreCache/evict.nl/wp-content/themes/limelight/fonts/fontawesome/fontawesome-webfont.woff b/PreCache/evict.nl/wp-content/themes/limelight/fonts/fontawesome/fontawesome-webfont.woff index 8c1748a..7eefa74 100644 Binary files a/PreCache/evict.nl/wp-content/themes/limelight/fonts/fontawesome/fontawesome-webfont.woff and b/PreCache/evict.nl/wp-content/themes/limelight/fonts/fontawesome/fontawesome-webfont.woff differ diff --git a/PreCache/evict.nl/wp-content/themes/limelight/js/navigation.js b/PreCache/evict.nl/wp-content/themes/limelight/js/navigation.js index f7adf55..0edcf7e 100644 Binary files a/PreCache/evict.nl/wp-content/themes/limelight/js/navigation.js and b/PreCache/evict.nl/wp-content/themes/limelight/js/navigation.js differ diff --git a/PreCache/evict.nl/wp-content/themes/limelight/js/responsiveslides.min.js b/PreCache/evict.nl/wp-content/themes/limelight/js/responsiveslides.min.js index 21d4832..57188f6 100644 Binary files a/PreCache/evict.nl/wp-content/themes/limelight/js/responsiveslides.min.js and b/PreCache/evict.nl/wp-content/themes/limelight/js/responsiveslides.min.js differ diff --git a/PreCache/evict.nl/wp-content/themes/limelight/js/skip-link-focus-fix.js b/PreCache/evict.nl/wp-content/themes/limelight/js/skip-link-focus-fix.js index e067cd5..3ea1188 100644 Binary files a/PreCache/evict.nl/wp-content/themes/limelight/js/skip-link-focus-fix.js and b/PreCache/evict.nl/wp-content/themes/limelight/js/skip-link-focus-fix.js differ diff --git a/PreCache/evict.nl/wp-content/themes/limelight/style.css b/PreCache/evict.nl/wp-content/themes/limelight/style.css index 1ef4a3e..3f8f9a6 100644 Binary files a/PreCache/evict.nl/wp-content/themes/limelight/style.css and b/PreCache/evict.nl/wp-content/themes/limelight/style.css differ diff --git a/PreCache/evict.nl/wp-content/uploads/2015/02/sunrise.png b/PreCache/evict.nl/wp-content/uploads/2015/02/sunrise.png index eb1b579..e424462 100644 Binary files a/PreCache/evict.nl/wp-content/uploads/2015/02/sunrise.png and b/PreCache/evict.nl/wp-content/uploads/2015/02/sunrise.png differ diff --git a/PreCache/evict.nl/wp-content/uploads/2015/02/sunset.png b/PreCache/evict.nl/wp-content/uploads/2015/02/sunset.png index 930baaa..964732a 100644 Binary files a/PreCache/evict.nl/wp-content/uploads/2015/02/sunset.png and b/PreCache/evict.nl/wp-content/uploads/2015/02/sunset.png differ diff --git a/PreCache/evict.nl/wp-content/uploads/2015/02/sunset1.png b/PreCache/evict.nl/wp-content/uploads/2015/02/sunset1.png index ff6a9ef..3e25a1f 100644 Binary files a/PreCache/evict.nl/wp-content/uploads/2015/02/sunset1.png and b/PreCache/evict.nl/wp-content/uploads/2015/02/sunset1.png differ diff --git a/PreCache/evict.nl/wp-content/uploads/2015/02/sunset4.png b/PreCache/evict.nl/wp-content/uploads/2015/02/sunset4.png index f409f4d..2bf4fb3 100644 Binary files a/PreCache/evict.nl/wp-content/uploads/2015/02/sunset4.png and b/PreCache/evict.nl/wp-content/uploads/2015/02/sunset4.png differ diff --git a/PreCache/evict.nl/wp-includes/js/jquery/jquery-migrate.min.js b/PreCache/evict.nl/wp-includes/js/jquery/jquery-migrate.min.js index 8b7ec47..86259ed 100644 Binary files a/PreCache/evict.nl/wp-includes/js/jquery/jquery-migrate.min.js and b/PreCache/evict.nl/wp-includes/js/jquery/jquery-migrate.min.js differ diff --git a/PreCache/evict.nl/wp-includes/js/jquery/jquery.js b/PreCache/evict.nl/wp-includes/js/jquery/jquery.js index 5a64f64..4ee6939 100644 Binary files a/PreCache/evict.nl/wp-includes/js/jquery/jquery.js and b/PreCache/evict.nl/wp-includes/js/jquery/jquery.js differ diff --git a/PreCache/evict.nl/wp-includes/js/mediaelement/mediaelement-and-player.min.js b/PreCache/evict.nl/wp-includes/js/mediaelement/mediaelement-and-player.min.js index fddc734..2f58d24 100644 Binary files a/PreCache/evict.nl/wp-includes/js/mediaelement/mediaelement-and-player.min.js and b/PreCache/evict.nl/wp-includes/js/mediaelement/mediaelement-and-player.min.js differ diff --git a/PreCache/evict.nl/wp-includes/js/mediaelement/mediaelementplayer.min.css b/PreCache/evict.nl/wp-includes/js/mediaelement/mediaelementplayer.min.css index 1508233..7de1e56 100644 Binary files a/PreCache/evict.nl/wp-includes/js/mediaelement/mediaelementplayer.min.css and b/PreCache/evict.nl/wp-includes/js/mediaelement/mediaelementplayer.min.css differ diff --git a/PreCache/evict.nl/wp-includes/js/mediaelement/wp-mediaelement.css b/PreCache/evict.nl/wp-includes/js/mediaelement/wp-mediaelement.css index daa659d..a6addd7 100644 Binary files a/PreCache/evict.nl/wp-includes/js/mediaelement/wp-mediaelement.css and b/PreCache/evict.nl/wp-includes/js/mediaelement/wp-mediaelement.css differ diff --git a/PreCache/evict.nl/wp-includes/js/mediaelement/wp-mediaelement.js b/PreCache/evict.nl/wp-includes/js/mediaelement/wp-mediaelement.js index 8c4364a..3e951bf 100644 Binary files a/PreCache/evict.nl/wp-includes/js/mediaelement/wp-mediaelement.js and b/PreCache/evict.nl/wp-includes/js/mediaelement/wp-mediaelement.js differ diff --git a/PreCache/evict.nl/wp-includes/js/tw-sack.min.js b/PreCache/evict.nl/wp-includes/js/tw-sack.min.js index 6f7812b..a4ad864 100644 Binary files a/PreCache/evict.nl/wp-includes/js/tw-sack.min.js and b/PreCache/evict.nl/wp-includes/js/tw-sack.min.js differ diff --git a/PreCache/evict.nl/wp-includes/js/wp-embed.min.js b/PreCache/evict.nl/wp-includes/js/wp-embed.min.js new file mode 100644 index 0000000..755b324 Binary files /dev/null and b/PreCache/evict.nl/wp-includes/js/wp-embed.min.js differ diff --git a/PreCache/evict.nl/wp-includes/js/wp-emoji-release.min.js b/PreCache/evict.nl/wp-includes/js/wp-emoji-release.min.js index 8273d09..7ceae92 100644 Binary files a/PreCache/evict.nl/wp-includes/js/wp-emoji-release.min.js and b/PreCache/evict.nl/wp-includes/js/wp-emoji-release.min.js differ diff --git a/PreCache/static.licdn.com/scds/common/u/img/webpromo/btn_in_20x15.png b/PreCache/static.licdn.com/scds/common/u/img/webpromo/btn_in_20x15.png index df0c47d..68a704b 100644 Binary files a/PreCache/static.licdn.com/scds/common/u/img/webpromo/btn_in_20x15.png and b/PreCache/static.licdn.com/scds/common/u/img/webpromo/btn_in_20x15.png differ