## WebKitWebContext WebKitWebContext |

## Synopsis

    struct              WebKitWebContext;
    enum                WebKitCacheModel;
    WebKitWebContext *  webkit_web_context_get_default      (void);
    WebKitCacheModel    webkit_web_context_get_cache_model  (WebKitWebContext *context);
    void                webkit_web_context_set_cache_model  (WebKitWebContext *context,
                                                             WebKitCacheModel cache_model);
    WebKitDownload *    webkit_web_context_download_uri     (WebKitWebContext *context,
                                                             const gchar *uri);

## Object Hierarchy

      GObject
       +----WebKitWebContext

## Signals

      "download-started"                               : Run Last

## Description

## Details

### struct WebKitWebContext

    struct WebKitWebContext;

### enum WebKitCacheModel

    typedef enum {
        WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER,
        WEBKIT_CACHE_MODEL_WEB_BROWSER,
        WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER
    } WebKitCacheModel;

Enum values used for determining the webview cache model.

`WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER` | Disable the cache completely, which substantially reduces memory usage. Useful for applications that only access a single local file, with no navigation to other pages. No remote resources will be cached.
`WEBKIT_CACHE_MODEL_WEB_BROWSER` | Improve document load speed substantially by caching a very large number of resources and previously viewed content.
`WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER` | A cache model optimized for viewing a series of local files -- for example, a documentation viewer or a website designer. WebKit will cache a moderate number of resources.

### webkit_web_context_get_default ()

    WebKitWebContext *  webkit_web_context_get_default      (void);

Gets the default web context

Returns : | (transfer none) a WebKitWebContext

### webkit_web_context_get_cache_model ()

    WebKitCacheModel    webkit_web_context_get_cache_model  (WebKitWebContext *context);

Returns the current cache model. For more information about this value check the documentation of the function `webkit_web_context_set_cache_model()`.

`context` : | the WebKitWebContext
Returns : | the current WebKitCacheModel

### webkit_web_context_set_cache_model ()

    void                webkit_web_context_set_cache_model  (WebKitWebContext *context,
                                                             WebKitCacheModel cache_model);

Specifies a usage model for WebViews, which WebKit will use to determine its caching behavior. All web views follow the cache model. This cache model determines the RAM and disk space to use for caching previously viewed content .

Research indicates that users tend to browse within clusters of documents that hold resources in common, and to revisit previously visited documents. WebKit and the frameworks below it include built-in caches that take advantage of these patterns, substantially improving document load speed in browsing situations. The WebKit cache model controls the behaviors of all of these caches, including various WebCore caches.

Browsers can improve document load speed substantially by specifying WEBKIT_CACHE_MODEL_WEB_BROWSER. Applications without a browsing interface can reduce memory usage substantially by specifying WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER. The default value is WEBKIT_CACHE_MODEL_WEB_BROWSER.

`context` : | the WebKitWebContext
`cache_model` : | a WebKitCacheModel

### webkit_web_context_download_uri ()

    WebKitDownload *    webkit_web_context_download_uri     (WebKitWebContext *context,
                                                             const gchar *uri);

Requests downloading of the specified URI string.

`context` : | a WebKitWebContext
`uri` : | the URI to download
Returns : | a new WebKitDownload representing the the download operation. [transfer full]

## Signal Details

### The `"download-started"` signal

    void                user_function                      (WebKitWebContext *context,
                                                            WebKitDownload   *download,
                                                            gpointer          user_data)      : Run Last

This signal is emitted when a new download request is made.

`context` : | the WebKitWebContext
`download` : | the WebKitDownload associated with this event
`user_data` : | user data set when the signal handler was connected.