diff options
Diffstat (limited to 'UICaboodle/BrowserView.mm')
-rw-r--r-- | UICaboodle/BrowserView.mm | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index fa71a74..d549640 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -541,10 +541,16 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se [webview_ loadRequest:request]; } -- (void) reloadURL { +- (void) reloadURLWithCache:(BOOL)cache { if (request_ == nil) return; + NSMutableURLRequest *request([request_ mutableCopy]); + [request setCachePolicy:(cache ? NSURLRequestUseProtocolCachePolicy : NSURLRequestReloadIgnoringLocalCacheData)]; + + [request_ autorelease]; + request_ = [request retain]; + if ([request_ HTTPBody] == nil && [request_ HTTPBodyStream] == nil) [self loadRequest:request_]; else { @@ -563,9 +569,13 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se } } +- (void) reloadURL { + [self reloadURLWithCache:YES]; +} + - (void) reloadData { [super reloadData]; - [self reloadURL]; + [self reloadURLWithCache:YES]; } - (void) setButtonImage:(NSString *)button withStyle:(NSString *)style toFunction:(id)function { @@ -1157,7 +1167,7 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se } - (void) reloadButtonClicked { - [self reloadURL]; + [self reloadURLWithCache:YES]; } - (void) _customButtonClicked { |