Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9174955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:50:14+00:00 2026-06-17T16:50:14+00:00

My aim is to build a web application using UIWebView on iOS, basicly doing

  • 0

My aim is to build a web application using UIWebView on iOS, basicly doing what BlackBerry do for Webworks.

After reading around I’m left unsure about how cache worked so i tried the following test:

Created simple web application with “Hello World” to begin.

Build & Ran the application – Worked fine

Then changed the login.html (thats what my hello world was called) The changes i made was i reaplced hello world with a hyperlink to another page.

When i Build&Run again the old page is still display.

So im assuming there’s caching somewhere?

Is there anyway to do the following/whats best?

  • Disable caching as speed isnt important all our files are on disk?
  • Clear the cache every time we launch the application?

Has anyone encountered this before?

Thanks

I have tried:
How to delete the cache from UIWebview or dealloc UIWebview

Another update ——

Tried another simple test, i deleted my HTML folder with all the html,css,js files in it so its now in trash. Ran the application again and delete html references from the project and it still loads them all perfect. So the whole thing is cached somewhere.

As another try i have also added:

-(void)dealloc{
    self.webView.delegate = nil;
    self.webView = nil;
    [webView release];
    [super dealloc];
}

In NativeViewController.m this did not help.

My applications code:`

#import "NativeViewController.h"

@implementation NativeViewController

@synthesize webView;

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];

NSString *filePath = [[NSBundle mainBundle] pathForResource:@"login" ofType:@"html"];  
NSData *htmlData = [NSData dataWithContentsOfFile:filePath];  
if (htmlData) {  
    NSBundle *bundle = [NSBundle mainBundle]; 
    NSString *path = [bundle bundlePath];
    NSString *fullPath = [NSBundle pathForResource:@"login" ofType:@"html" inDirectory:path];
    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:fullPath]]];

}
}


- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];

// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
[self.webView removeFromSuperview];
self.webView.delegate = nil;
self.webView = nil;
}


 -(void)webViewDidFinishLoad{
[[NSURLCache sharedURLCahce] removeAllCachedResponses];
}
- (void)dealloc {
[webView release];
[super dealloc];
}
@end

`

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:50:15+00:00Added an answer on June 17, 2026 at 4:50 pm

    Try this

    if ([htmlData length]==0) {
    //no data
    }
    

    This will not load the data if its length is 0.
    In other conditions even if you will remove the html file from your project it will be there in the simulator unless you do not reset it.

    Hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to build many data-driven web application for various clients. The aim is
Now I am creating a chat application. I am currently using webapi to build
I'm trying to wrap my head around jQuery Mobile. My aim is to build
I have a web application built using maven. It is built in the form
I am learning OpenGL with an aim to build OpenGL ES application for Android
My aim is to create a status bar application which will draw drop down
I was looking to build a Data Access Layer for my new web based
I'm trying to build svn client on Mac OS 10.7.5. My aim is to
I am using PHP to iterate over the following result set, the aim is
I want to create a continuous build integration system for .NET using just Windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.