:right-sidebar: True WebsiteData =================================================================== .. currentmodule:: gi.repository.WebKit .. versionadded:: 2.16 .. class:: WebsiteData(*args, **kwargs) :no-contents-entry: Data stored locally by a web site. WebKitWebsiteData represents data stored in the client by a particular website. A website is normally a set of URLs grouped by domain name. You can get the website name, which is usually the domain, with :func:`~gi.repository.WebKit.WebsiteData.get_name`. Documents loaded from the file system, like file:// URIs, are all grouped in the same WebKitWebsiteData with the name "Local files". A website can store different types of data in the client side. :obj:`~gi.repository.WebKit.WebsiteDataTypes` is an enum containing all the possible data types; use :func:`~gi.repository.WebKit.WebsiteData.get_types` to get the bitmask of data types. It's also possible to know the size of the data stored for some of the :obj:`~gi.repository.WebKit.WebsiteDataTypes` by using :func:`~gi.repository.WebKit.WebsiteData.get_size`. A list of WebKitWebsiteData can be retrieved with :func:`~gi.repository.WebKit.WebsiteDataManager.fetch`. See :obj:`~gi.repository.WebKit.WebsiteDataManager` for more information. Methods ------- .. rst-class:: interim-class .. class:: WebsiteData :no-index: .. method:: get_name() -> str Gets the name of :obj:`~gi.repository.WebKit.WebsiteData`\. This is the website name, normally represented by a domain or host name. All local documents are grouped in the same :obj:`~gi.repository.WebKit.WebsiteData` using the name "Local files". .. versionadded:: 2.16 .. method:: get_size(types: ~gi.repository.WebKit.WebsiteDataTypes) -> int Gets the size of the data of types ``types`` in a :obj:`~gi.repository.WebKit.WebsiteData`\. Note that currently the data size is only known for :const:`~gi.repository.WebKit.WebsiteDataTypes.DISK_CACHE` data type so for all other types 0 will be returned. .. versionadded:: 2.16 :param types: a bitmask of :obj:`~gi.repository.WebKit.WebsiteDataTypes` .. method:: get_types() -> ~gi.repository.WebKit.WebsiteDataTypes Gets the types of data stored in the client for a :obj:`~gi.repository.WebKit.WebsiteData`\. These are the types actually present, not the types queried with :func:`~gi.repository.WebKit.WebsiteDataManager.fetch`. .. versionadded:: 2.16