[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 {
}
}
+- (void) reloadURL {
+ [self reloadURLWithCache:YES];
+}
+
- (void) reloadData {
[super reloadData];
- [self reloadURL];
+ [self reloadURLWithCache:YES];
}
- (void) setButtonImage:(NSString *)button withStyle:(NSString *)style toFunction:(id)function {
[self _setViewportWidth];
}
+- (void) _setViewportWidthOnMainThread:(NSNumber *)width {
+ [self setViewportWidth:[width floatValue]];
+}
+
+- (void) setViewportWidthOnMainThread:(float)width {
+ [self performSelectorOnMainThread:@selector(_setViewportWidthOnMainThread:) withObject:[NSNumber numberWithFloat:width] waitUntilDone:NO];
+}
+
- (void) webViewUpdateViewSettings:(UIWebView *)view {
[self _setViewportWidth];
}
}
- (void) reloadButtonClicked {
- [self reloadURL];
+ [self reloadURLWithCache:YES];
}
- (void) _customButtonClicked {