Table of contents:
- Introduction
- Settings
- Font settings
- accept_language_list
- application_cache_disabled
- background_color
- databases_disabled
- default_encoding
- dom_paste_disabled
- file_access_from_file_urls_allowed
- image_load_disabled
- javascript_disabled
- javascript_open_windows_disallowed
- javascript_close_windows_disallowed
- javascript_access_clipboard_disallowed
- local_storage_disabled
- plugins_disabled
- remote_fonts
- shrink_standalone_images_to_fit
- tab_to_links_disabled
- text_area_resize_disabled
- universal_access_from_file_urls_allowed
- user_style_sheet_location
- web_security_disabled
- webgl_disabled
- windowless_frame_rate
This dictionary of settings can be passed to cefpython.CreateBrowser().
Many of these settings have their command line switch equivalent, see the CommandLineSwitches page.
In some cases, the default values of settings that are suggested by its name may not always be correct. This is because in one of CEF releases naming of these settings changed, and they started to accept states (enabled or disabled), instead of the state being included in its name (some_option_disabled). CEF Python tries to be backwards compatible, that's why the old naming convention is still used. Read description of setting and if you see that it mentions command line switch that starts with "disable-", it means that its default state is "enabled". If the command line switch starts with "enable-" then its default state is "disabled".
- standard_font_family (string)
- fixed_font_family (string)
- serif_font_family (string)
- sans_serif_font_family (string)
- cursive_font_family (string)
- fantasy_font_family (string)
- default_font_size (int)
- default_fixed_font_size (int)
- minimum_font_size (int)
- minimum_logical_font_size (int)
(string) Comma delimited ordered list of language codes without any whitespace that will be used in the "Accept-Language" HTTP header. May be set globally using the CefBrowserSettings.accept_language_list value. If both values are empty then "en-US,en" will be used.
(bool) Controls whether the application cache can be used. Also configurable using the --disable-application-cache switch.
(int) Opaque background color used for the browser before a document is loaded and when no document color is specified. By default the background color will be the same as CefSettings.background_color. Only the RGB compontents of the specified value will be used. The alpha component must greater than 0 to enable use of the background color but will be otherwise ignored.
(bool) Controls whether databases can be used. Also configurable using the --disable-databases switch.
(string) Default encoding for Web content. If empty "ISO-8859-1" will be used. Also configurable using the --default-encoding switch.
(bool) Controls whether DOM pasting is supported in the editor via execCommand("paste")
. The |javascript_access_clipboard_disallowed| setting must also be set (to true or false). Also configurable using the --disable-javascript-dom-paste switch.
(bool) Controls whether file URLs will have access to other file URLs. Also configurable using the --allow-access-from-files switch. Other similar switches are: --allow-file-access and --allow-file-access-from-files.
(bool) Controls whether image URLs will be loaded from the network. A cached image will still be rendered if requested. Also configurable using the --disable-image-loading switch.
(bool) Controls whether Javascript can be executed. Also configurable using the --disable-javascript switch.
(bool) Controls whether Javascript can be used for opening windows. Also configurable using the --disable-javascript-open-windows switch.
(bool) Controls whether JavaScript can be used to close windows that were not opened via JavaScript. JavaScript can still be used to close windows that were opened via JavaScript or that have no back/forward history. Also configurable using the "disable-javascript-close-windows" command-line switch.
(bool) Controls whether Javascript can access the clipboard. Also configurable using the --disable-javascript-access-clipboard switch.
(bool) Controls whether local storage can be used. Also configurable using the --disable-local-storage switch.
(bool) Controls whether any plugins will be loaded. Also configurable using the --disable-plugins switch.
(bool) Controls the loading of fonts from remote sources. Also configurable using the --disable-remote-fonts switch.
(bool) Controls whether standalone images will be shrunk to fit the page. Also configurable using the --image-shrink-standalone-to-fit switch.
(bool) Controls whether the tab key can advance focus to links. Also configurable using the --disable-tab-to-links switch.
(bool) Controls whether text areas can be resized. Also configurable using the --disable-text-area-resize switch.
(bool) Controls whether file URLs will have access to all URLs. Also configurable using the --allow-universal-access-from-files switch. Other similar switches are --allow-file-access and --allow-file-access-from-files.
(string) Location of the user style sheet that will be used for all pages. This must be a data URL of the form data:text/css;charset=utf-8;base64,content
where "content" is the base64 encoded contents of the CSS file. Also configurable using the "user-style-sheet-location" command-line switch.
This setting was removed in Chrome 33. Soon it will be removed from cefpython as well.
(bool) Controls whether web security restrictions (same-origin policy) will be enforced. Disabling this setting is not recommend as it will allow risky security behavior such as cross-site scripting (XSS). Also configurable using the --disable-web-security switch.
(bool) Controls whether WebGL can be used. Note that WebGL requires hardware support and may not work on all systems even when enabled. Also configurable using the --disable-webgl switch.
(int) The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint will be called for a windowless browser. The actual fps may be lower if the browser cannot generate frames at the requested rate. The minimum value is 1 and the maximum value is 60 (default 30). This value can also be changed dynamically via CefBrowserHost::SetWindowlessFrameRate.