Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline Application in OWKS #145

Open
GoogleCodeExporter opened this issue Apr 15, 2015 · 1 comment
Open

Offline Application in OWKS #145

GoogleCodeExporter opened this issue Apr 15, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

I've been bashing my head against this for almost a week now, and while I've 
made some progress, I feel as if my lack of experience working with browsers 
and web coding in general (I really have 0 experience with this) has led me as 
far as I can get in a reasonable amount of time.

As can be guessed from the title, I am attempting to enable offline 
applications in a basic OWKS browser.  This storage aspect of this has been 
rather simple to fix.  Included in WebKit preferences is the flag 
offlineWebApplicationCacheEnabled along with the method 
setOfflineWebApplicationCacheEnabled().  Enabling this feature in OWKS was as 
simple as creating a boolean and the following function in GlobalPreferences.cs:

private Boolean offlineWebApplicationCacheEnabled;


[Browsable(true), Category("Behavior"), 
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Specifies whether offline application caching is enabled.")]
public bool setOfflineWebApplicationCacheEnabled
{
    get {
        return offlineWebApplicationCacheEnabled;
    }
    set {
        try{
            preferences.setOfflineWebApplicationCacheEnabled(Convert.ToInt32(value));
            offlineWebApplicationCacheEnabled = value;
        }catch{}
    }
}

And voila caching works.  I'm quite certain it is working because caching an 
application using a simple OWKS browser and then inserting the resulting 
ApplicationCache.db (it's cached as an sq3lite database) into Safari's local 
database storage will run the application offline perfectly.  There is no such 
equivalent luck running the simple browser offline, though the application runs 
perfectly while online (connected to the internet).

I believe I may have pinpointed the problem: javascript isn't being executed 
offline.   After traversing the DOM trees of the online rendered page and the 
offline rendered page, I found some iframes missing, all of which are created 
and inserted into the tree via javascript calls.  Presumably, this means these 
calls aren't being made.  However, javascript has been enabled, and I am thus 
at a loss as to why this isn't working.

Any help would be appreciated, my apologies if this is a simple question and/or 
should not have been posted here.

Original issue reported on code.google.com by [email protected] on 11 Oct 2012 at 3:02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant