Add content.headers and content.cache groups
This commit is contained in:
parent
50602cbf26
commit
df1685905e
@ -101,16 +101,20 @@
|
||||
|<<completion.web_history_max_items,completion.web_history_max_items>>|How many URLs to show in the web history.
|
||||
|<<confirm_quit,confirm_quit>>|Whether to confirm quitting the application.
|
||||
|<<content.accept_language,content.accept_language>>|Value to send in the `accept-language` header.
|
||||
|<<content.cache_size,content.cache_size>>|Size of the HTTP network cache. Empty to use the default value.
|
||||
|<<content.cache.appcache,content.cache.appcache>>|Whether support for the HTML 5 web application cache feature is enabled.
|
||||
|<<content.cache.maximum_pages,content.cache.maximum_pages>>|The maximum number of pages to hold in the global memory page cache.
|
||||
|<<content.cache.size,content.cache.size>>|Size of the HTTP network cache. Empty to use the default value.
|
||||
|<<content.cookies.accept,content.cookies.accept>>|Control which cookies to accept.
|
||||
|<<content.cookies.store,content.cookies.store>>|Whether to store cookies. Note this option needs a restart with QtWebEngine on Qt < 5.9.
|
||||
|<<content.custom_headers,content.custom_headers>>|Set custom headers for qutebrowser HTTP requests.
|
||||
|<<content.default_encoding,content.default_encoding>>|Default encoding to use for websites.
|
||||
|<<content.developer_extras,content.developer_extras>>|Enable extra tools for Web developers.
|
||||
|<<content.dns_prefetch,content.dns_prefetch>>|Whether to try to pre-fetch DNS entries to speed up browsing.
|
||||
|<<content.do_not_track,content.do_not_track>>|Value to send in the `DNT` header.
|
||||
|<<content.frame_flattening,content.frame_flattening>>|Whether to expand each subframe to its contents.
|
||||
|<<content.geolocation,content.geolocation>>|Allow websites to request geolocations.
|
||||
|<<content.headers.custom,content.headers.custom>>|Set custom headers for qutebrowser HTTP requests.
|
||||
|<<content.headers.do_not_track,content.headers.do_not_track>>|Value to send in the `DNT` header.
|
||||
|<<content.headers.referer,content.headers.referer>>|Send the Referer header
|
||||
|<<content.headers.user_agent,content.headers.user_agent>>|User agent to send. Unset to send the default.
|
||||
|<<content.host_blocking.enabled,content.host_blocking.enabled>>|Whether host blocking is enabled.
|
||||
|<<content.host_blocking.lists,content.host_blocking.lists>>|List of URLs of lists which contain hosts to block.
|
||||
|<<content.host_blocking.whitelist,content.host_blocking.whitelist>>|List of domains that should always be loaded, despite being ad-blocked.
|
||||
@ -127,20 +131,16 @@
|
||||
|<<content.local_content_can_access_file_urls,content.local_content_can_access_file_urls>>|Whether locally loaded documents are allowed to access other local urls.
|
||||
|<<content.local_content_can_access_remote_urls,content.local_content_can_access_remote_urls>>|Whether locally loaded documents are allowed to access remote urls.
|
||||
|<<content.local_storage,content.local_storage>>|Whether support for HTML 5 local storage and Web SQL is enabled.
|
||||
|<<content.maximum_pages_in_cache,content.maximum_pages_in_cache>>|The maximum number of pages to hold in the global memory page cache.
|
||||
|<<content.media_capture,content.media_capture>>|Allow websites to record audio/video.
|
||||
|<<content.netrc_file,content.netrc_file>>|Location of a netrc-file for HTTP authentication.
|
||||
|<<content.notifications,content.notifications>>|Allow websites to show notifications.
|
||||
|<<content.offline_web_application_cache,content.offline_web_application_cache>>|Whether support for the HTML 5 web application cache feature is enabled.
|
||||
|<<content.pdfjs,content.pdfjs>>|Enable pdf.js to view PDF files in the browser.
|
||||
|<<content.plugins,content.plugins>>|Enables or disables plugins in Web pages.
|
||||
|<<content.print_element_backgrounds,content.print_element_backgrounds>>|Whether the background color and images are also drawn when the page is printed.
|
||||
|<<content.private_browsing,content.private_browsing>>|Open new windows in private browsing mode which does not record visited pages.
|
||||
|<<content.proxy,content.proxy>>|The proxy to use.
|
||||
|<<content.proxy_dns_requests,content.proxy_dns_requests>>|Whether to send DNS requests over the configured proxy.
|
||||
|<<content.referer_header,content.referer_header>>|Send the Referer header
|
||||
|<<content.ssl_strict,content.ssl_strict>>|Whether to validate SSL handshakes.
|
||||
|<<content.user_agent,content.user_agent>>|User agent to send. Unset to send the default.
|
||||
|<<content.user_stylesheet,content.user_stylesheet>>|User stylesheet to use (absolute filename or filename relative to the config directory). Will expand environment variables.
|
||||
|<<content.webgl,content.webgl>>|Enables or disables WebGL.
|
||||
|<<content.xss_auditing,content.xss_auditing>>|Whether load requests should be monitored for cross-site scripting attempts.
|
||||
@ -920,8 +920,33 @@ Value to send in the `accept-language` header.
|
||||
|
||||
Default: +pass:[en-US,en]+
|
||||
|
||||
[[content.cache_size]]
|
||||
== content.cache_size
|
||||
[[content.cache.appcache]]
|
||||
== content.cache.appcache
|
||||
Whether support for the HTML 5 web application cache feature is enabled.
|
||||
An application cache acts like an HTTP cache in some sense. For documents that use the application cache via JavaScript, the loader engine will first ask the application cache for the contents, before hitting the network.
|
||||
The feature is described in details at: http://dev.w3.org/html5/spec/Overview.html#appcache
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
|
||||
[[content.cache.maximum_pages]]
|
||||
== content.cache.maximum_pages
|
||||
The maximum number of pages to hold in the global memory page cache.
|
||||
The Page Cache allows for a nicer user experience when navigating forth or back to pages in the forward/back history, by pausing and resuming up to _n_ pages.
|
||||
For more information about the feature, please refer to: http://webkit.org/blog/427/webkit-page-cache-i-the-basics/
|
||||
|
||||
Default: empty
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
|
||||
[[content.cache.size]]
|
||||
== content.cache.size
|
||||
Size of the HTTP network cache. Empty to use the default value.
|
||||
|
||||
Default: empty
|
||||
@ -952,12 +977,6 @@ Valid values:
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.custom_headers]]
|
||||
== content.custom_headers
|
||||
Set custom headers for qutebrowser HTTP requests.
|
||||
|
||||
Default: empty
|
||||
|
||||
[[content.default_encoding]]
|
||||
== content.default_encoding
|
||||
Default encoding to use for websites.
|
||||
@ -992,17 +1011,6 @@ Default: +pass:[true]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
|
||||
[[content.do_not_track]]
|
||||
== content.do_not_track
|
||||
Value to send in the `DNT` header.
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.frame_flattening]]
|
||||
== content.frame_flattening
|
||||
Whether to expand each subframe to its contents.
|
||||
@ -1029,6 +1037,43 @@ Valid values:
|
||||
|
||||
Default: +pass:[ask]+
|
||||
|
||||
[[content.headers.custom]]
|
||||
== content.headers.custom
|
||||
Set custom headers for qutebrowser HTTP requests.
|
||||
|
||||
Default: empty
|
||||
|
||||
[[content.headers.do_not_track]]
|
||||
== content.headers.do_not_track
|
||||
Value to send in the `DNT` header.
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.headers.referer]]
|
||||
== content.headers.referer
|
||||
Send the Referer header
|
||||
|
||||
Valid values:
|
||||
|
||||
* +always+: Always send.
|
||||
* +never+: Never send; this is not recommended, as some sites may break.
|
||||
* +same-domain+: Only send for the same domain. This will still protect your privacy, but shouldn't break any sites.
|
||||
|
||||
Default: +pass:[same-domain]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
|
||||
[[content.headers.user_agent]]
|
||||
== content.headers.user_agent
|
||||
User agent to send. Unset to send the default.
|
||||
|
||||
Default: empty
|
||||
|
||||
[[content.host_blocking.enabled]]
|
||||
== content.host_blocking.enabled
|
||||
Whether host blocking is enabled.
|
||||
@ -1209,16 +1254,6 @@ Valid values:
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.maximum_pages_in_cache]]
|
||||
== content.maximum_pages_in_cache
|
||||
The maximum number of pages to hold in the global memory page cache.
|
||||
The Page Cache allows for a nicer user experience when navigating forth or back to pages in the forward/back history, by pausing and resuming up to _n_ pages.
|
||||
For more information about the feature, please refer to: http://webkit.org/blog/427/webkit-page-cache-i-the-basics/
|
||||
|
||||
Default: empty
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
|
||||
[[content.media_capture]]
|
||||
== content.media_capture
|
||||
Allow websites to record audio/video.
|
||||
@ -1252,21 +1287,6 @@ Valid values:
|
||||
|
||||
Default: +pass:[ask]+
|
||||
|
||||
[[content.offline_web_application_cache]]
|
||||
== content.offline_web_application_cache
|
||||
Whether support for the HTML 5 web application cache feature is enabled.
|
||||
An application cache acts like an HTTP cache in some sense. For documents that use the application cache via JavaScript, the loader engine will first ask the application cache for the contents, before hitting the network.
|
||||
The feature is described in details at: http://dev.w3.org/html5/spec/Overview.html#appcache
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
|
||||
[[content.pdfjs]]
|
||||
== content.pdfjs
|
||||
Enable pdf.js to view PDF files in the browser.
|
||||
@ -1341,20 +1361,6 @@ Default: +pass:[true]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
|
||||
[[content.referer_header]]
|
||||
== content.referer_header
|
||||
Send the Referer header
|
||||
|
||||
Valid values:
|
||||
|
||||
* +always+: Always send.
|
||||
* +never+: Never send; this is not recommended, as some sites may break.
|
||||
* +same-domain+: Only send for the same domain. This will still protect your privacy, but shouldn't break any sites.
|
||||
|
||||
Default: +pass:[same-domain]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
|
||||
[[content.ssl_strict]]
|
||||
== content.ssl_strict
|
||||
Whether to validate SSL handshakes.
|
||||
@ -1367,12 +1373,6 @@ Valid values:
|
||||
|
||||
Default: +pass:[ask]+
|
||||
|
||||
[[content.user_agent]]
|
||||
== content.user_agent
|
||||
User agent to send. Unset to send the default.
|
||||
|
||||
Default: empty
|
||||
|
||||
[[content.user_stylesheet]]
|
||||
== content.user_stylesheet
|
||||
User stylesheet to use (absolute filename or filename relative to the config directory). Will expand environment variables.
|
||||
|
@ -33,11 +33,11 @@ class CallSuper(Exception):
|
||||
def custom_headers():
|
||||
"""Get the combined custom headers."""
|
||||
headers = {}
|
||||
dnt = b'1' if config.val.content.do_not_track else b'0'
|
||||
dnt = b'1' if config.val.content.headers.do_not_track else b'0'
|
||||
headers[b'DNT'] = dnt
|
||||
headers[b'X-Do-Not-Track'] = dnt
|
||||
|
||||
for header, value in config.val.content.custom_headers.items():
|
||||
for header, value in config.val.content.headers.custom.items():
|
||||
headers[header.encode('ascii')] = value.encode('ascii')
|
||||
|
||||
accept_language = config.val.content.accept_language
|
||||
|
@ -63,6 +63,6 @@ class RequestInterceptor(QWebEngineUrlRequestInterceptor):
|
||||
for header, value in shared.custom_headers():
|
||||
info.setHttpHeader(header, value)
|
||||
|
||||
user_agent = config.val.content.user_agent
|
||||
user_agent = config.val.content.headers.user_agent
|
||||
if user_agent is not None:
|
||||
info.setHttpHeader(b'User-Agent', user_agent.encode('ascii'))
|
||||
|
@ -163,7 +163,7 @@ def _set_user_agent(profile):
|
||||
per-domain user agents), but this one still gets used for things like
|
||||
window.navigator.userAgent in JS.
|
||||
"""
|
||||
profile.setHttpUserAgent(config.val.content.user_agent)
|
||||
profile.setHttpUserAgent(config.val.content.headers.user_agent)
|
||||
|
||||
|
||||
def _update_settings(option):
|
||||
@ -172,7 +172,7 @@ def _update_settings(option):
|
||||
if option in ['scrollbar.hide', 'content.user_stylesheet']:
|
||||
_init_stylesheet(default_profile)
|
||||
_init_stylesheet(private_profile)
|
||||
elif option == 'content.user_agent':
|
||||
elif option == 'content.headers.user_agent':
|
||||
_set_user_agent(default_profile)
|
||||
_set_user_agent(private_profile)
|
||||
|
||||
@ -256,7 +256,7 @@ MAPPINGS = {
|
||||
Attribute(QWebEngineSettings.WebGLEnabled),
|
||||
'content.local_storage':
|
||||
Attribute(QWebEngineSettings.LocalStorageEnabled),
|
||||
'content.cache_size':
|
||||
'content.cache.size':
|
||||
# 0: automatically managed by QtWebEngine
|
||||
DefaultProfileSetter('setHttpCacheMaximumSize', default=0),
|
||||
'content.xss_auditing':
|
||||
|
@ -42,10 +42,10 @@ class DiskCache(QNetworkDiskCache):
|
||||
maxsize=self.maximumCacheSize(),
|
||||
path=self.cacheDirectory())
|
||||
|
||||
@config.change_filter('content.cache_size')
|
||||
@config.change_filter('content.cache.size')
|
||||
def _set_cache_size(self):
|
||||
"""Set the cache size based on the config."""
|
||||
size = config.val.content.cache_size
|
||||
size = config.val.content.cache.size
|
||||
if size is None:
|
||||
size = 1024 * 1024 * 50 # default from QNetworkDiskCachePrivate
|
||||
# WORKAROUND for https://bugreports.qt.io/browse/QTBUG-59909
|
||||
|
@ -338,7 +338,7 @@ class NetworkManager(QNetworkAccessManager):
|
||||
|
||||
def set_referer(self, req, current_url):
|
||||
"""Set the referer header."""
|
||||
referer_header_conf = config.val.content.referer_header
|
||||
referer_header_conf = config.val.content.headers.referer
|
||||
|
||||
try:
|
||||
if referer_header_conf == 'never':
|
||||
|
@ -177,12 +177,12 @@ MAPPINGS = {
|
||||
Attribute(QWebSettings.DnsPrefetchEnabled),
|
||||
'content.frame_flattening':
|
||||
Attribute(QWebSettings.FrameFlatteningEnabled),
|
||||
'content.offline_web_application_cache':
|
||||
'content.cache.appcache':
|
||||
Attribute(QWebSettings.OfflineWebApplicationCacheEnabled),
|
||||
'content.local_storage':
|
||||
Attribute(QWebSettings.LocalStorageEnabled,
|
||||
QWebSettings.OfflineStorageDatabaseEnabled),
|
||||
'content.maximum_pages_in_cache':
|
||||
'content.cache.maximum_pages':
|
||||
StaticSetter(QWebSettings.setMaximumPagesInCache),
|
||||
'content.developer_extras':
|
||||
Attribute(QWebSettings.DeveloperExtrasEnabled),
|
||||
|
@ -384,7 +384,7 @@ class BrowserPage(QWebPage):
|
||||
|
||||
def userAgentForUrl(self, url):
|
||||
"""Override QWebPage::userAgentForUrl to customize the user agent."""
|
||||
ua = config.val.content.user_agent
|
||||
ua = config.val.content.headers.user_agent
|
||||
if ua is None:
|
||||
return super().userAgentForUrl(url)
|
||||
else:
|
||||
|
@ -417,7 +417,7 @@ def run_async(tab, cmd, *args, win_id, env, verbose=False):
|
||||
lambda cmd:
|
||||
log.commands.debug("Got userscript command: {}".format(cmd)))
|
||||
runner.got_cmd.connect(commandrunner.run_safely)
|
||||
user_agent = config.val.content.user_agent
|
||||
user_agent = config.val.content.headers.user_agent
|
||||
if user_agent is not None:
|
||||
env['QUTE_USER_AGENT'] = user_agent
|
||||
|
||||
|
@ -71,7 +71,7 @@ content.accept_language:
|
||||
default: en-US,en
|
||||
desc: Value to send in the `accept-language` header.
|
||||
|
||||
content.cache_size:
|
||||
content.cache.size:
|
||||
default: null
|
||||
type:
|
||||
name: Int
|
||||
@ -80,6 +80,37 @@ content.cache_size:
|
||||
maxval: maxint64
|
||||
desc: Size of the HTTP network cache. Empty to use the default value.
|
||||
|
||||
# Defaults from QWebSettings::QWebSettings() in
|
||||
# qtwebkit/Source/WebKit/qt/Api/qwebsettings.cpp
|
||||
|
||||
content.cache.maximum_pages:
|
||||
default: 0
|
||||
type:
|
||||
name: Int
|
||||
minval: 0
|
||||
maxval: maxint
|
||||
backend: QtWebKit
|
||||
desc: >-
|
||||
The maximum number of pages to hold in the global memory page cache.
|
||||
|
||||
The Page Cache allows for a nicer user experience when navigating forth or back
|
||||
to pages in the forward/back history, by pausing and resuming up to _n_ pages.
|
||||
|
||||
For more information about the feature, please refer to: http://webkit.org/blog/427/webkit-page-cache-i-the-basics/
|
||||
|
||||
content.cache.appcache:
|
||||
default: true
|
||||
type: Bool
|
||||
backend: QtWebKit
|
||||
desc: >-
|
||||
Whether support for the HTML 5 web application cache feature is enabled.
|
||||
|
||||
An application cache acts like an HTTP cache in some sense. For documents that
|
||||
use the application cache via JavaScript, the loader engine will first ask the
|
||||
application cache for the contents, before hitting the network.
|
||||
|
||||
The feature is described in details at: http://dev.w3.org/html5/spec/Overview.html#appcache
|
||||
|
||||
content.cookies.accept:
|
||||
default: no-3rdparty
|
||||
backend: QtWebKit
|
||||
@ -99,19 +130,6 @@ content.cookies.store:
|
||||
desc: Whether to store cookies. Note this option needs a restart with QtWebEngine
|
||||
on Qt < 5.9.
|
||||
|
||||
content.custom_headers:
|
||||
default: {}
|
||||
type:
|
||||
name: Dict
|
||||
keytype:
|
||||
name: String
|
||||
encoding: ascii
|
||||
valtype:
|
||||
name: String
|
||||
encoding: ascii
|
||||
none_ok: true
|
||||
desc: Set custom headers for qutebrowser HTTP requests.
|
||||
|
||||
content.default_encoding:
|
||||
type: String
|
||||
default: iso-8859-1
|
||||
@ -138,11 +156,6 @@ content.dns_prefetch:
|
||||
backend: QtWebKit
|
||||
desc: Whether to try to pre-fetch DNS entries to speed up browsing.
|
||||
|
||||
content.do_not_track:
|
||||
type: Bool
|
||||
default: true
|
||||
desc: Value to send in the `DNT` header.
|
||||
|
||||
content.frame_flattening:
|
||||
default: false
|
||||
type: Bool
|
||||
@ -157,6 +170,87 @@ content.geolocation:
|
||||
type: BoolAsk
|
||||
desc: Allow websites to request geolocations.
|
||||
|
||||
content.headers.custom:
|
||||
default: {}
|
||||
type:
|
||||
name: Dict
|
||||
keytype:
|
||||
name: String
|
||||
encoding: ascii
|
||||
valtype:
|
||||
name: String
|
||||
encoding: ascii
|
||||
none_ok: true
|
||||
desc: Set custom headers for qutebrowser HTTP requests.
|
||||
|
||||
content.headers.do_not_track:
|
||||
type: Bool
|
||||
default: true
|
||||
desc: Value to send in the `DNT` header.
|
||||
|
||||
content.headers.referer:
|
||||
default: same-domain
|
||||
type:
|
||||
name: String
|
||||
valid_values:
|
||||
- always: "Always send."
|
||||
- never: "Never send; this is not recommended, as some sites may break."
|
||||
- same-domain: "Only send for the same domain. This will still protect
|
||||
your privacy, but shouldn't break any sites."
|
||||
backend: QtWebKit
|
||||
desc: Send the Referer header
|
||||
|
||||
content.headers.user_agent:
|
||||
default: null
|
||||
type:
|
||||
name: String
|
||||
none_ok: true
|
||||
completions:
|
||||
# To update the following list of user agents, run the script 'ua_fetch.py'
|
||||
# Vim-protip: Place your cursor below this comment and run
|
||||
# :r!python scripts/dev/ua_fetch.py
|
||||
- - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:53.0) Gecko/20100101
|
||||
Firefox/53.0"
|
||||
- Firefox 53.0 Win8.1
|
||||
- - "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101
|
||||
Firefox/53.0"
|
||||
- Firefox 53.0 Linux
|
||||
- - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101
|
||||
Firefox/53.0"
|
||||
- Firefox 53.0 MacOSX
|
||||
|
||||
- - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4
|
||||
(KHTML, like Gecko) Version/10.1.1 Safari/603.2.4"
|
||||
- Safari Generic MacOSX
|
||||
- - "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30
|
||||
(KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1"
|
||||
- Mobile Safari 10.0 iOS
|
||||
|
||||
- - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
|
||||
like Gecko) Chrome/58.0.3029.110 Safari/537.36"
|
||||
- Chrome Generic Win10
|
||||
- - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36
|
||||
(KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
|
||||
- Chrome Generic MacOSX
|
||||
- - "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
|
||||
Gecko) Chrome/58.0.3029.110 Safari/537.36"
|
||||
- Chrome Generic Linux
|
||||
|
||||
- - "Mozilla/5.0 (compatible; Googlebot/2.1;
|
||||
+http://www.google.com/bot.html"
|
||||
- Google Bot
|
||||
- - "Wget/1.16.1 (linux-gnu)"
|
||||
- wget 1.16.1
|
||||
- - "curl/7.40.0"
|
||||
- curl 7.40.0
|
||||
- - "Mozilla/5.0 (Linux; U; Android 7.1.2) AppleWebKit/534.30 (KHTML, like
|
||||
Gecko) Version/4.0 Mobile Safari/534.30"
|
||||
- Mobile Generic Android
|
||||
- - "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
|
||||
- IE 11.0 for Desktop Win7 64-bit
|
||||
|
||||
desc: User agent to send. Unset to send the default.
|
||||
|
||||
content.host_blocking.enabled:
|
||||
default: true
|
||||
type: Bool
|
||||
@ -274,24 +368,6 @@ content.local_storage:
|
||||
type: Bool
|
||||
desc: Whether support for HTML 5 local storage and Web SQL is enabled.
|
||||
|
||||
# Defaults from QWebSettings::QWebSettings() in
|
||||
# qtwebkit/Source/WebKit/qt/Api/qwebsettings.cpp
|
||||
|
||||
content.maximum_pages_in_cache:
|
||||
default: 0
|
||||
type:
|
||||
name: Int
|
||||
minval: 0
|
||||
maxval: maxint
|
||||
backend: QtWebKit
|
||||
desc: >-
|
||||
The maximum number of pages to hold in the global memory page cache.
|
||||
|
||||
The Page Cache allows for a nicer user experience when navigating forth or back
|
||||
to pages in the forward/back history, by pausing and resuming up to _n_ pages.
|
||||
|
||||
For more information about the feature, please refer to: http://webkit.org/blog/427/webkit-page-cache-i-the-basics/
|
||||
|
||||
content.media_capture:
|
||||
default: ask
|
||||
type: BoolAsk
|
||||
@ -313,19 +389,6 @@ content.notifications:
|
||||
type: BoolAsk
|
||||
desc: Allow websites to show notifications.
|
||||
|
||||
content.offline_web_application_cache:
|
||||
default: true
|
||||
type: Bool
|
||||
backend: QtWebKit
|
||||
desc: >-
|
||||
Whether support for the HTML 5 web application cache feature is enabled.
|
||||
|
||||
An application cache acts like an HTTP cache in some sense. For documents that
|
||||
use the application cache via JavaScript, the loader engine will first ask the
|
||||
application cache for the contents, before hitting the network.
|
||||
|
||||
The feature is described in details at: http://dev.w3.org/html5/spec/Overview.html#appcache
|
||||
|
||||
content.pdfjs:
|
||||
default: false
|
||||
type: Bool
|
||||
@ -374,74 +437,11 @@ content.proxy_dns_requests:
|
||||
backend: QtWebKit
|
||||
desc: Whether to send DNS requests over the configured proxy.
|
||||
|
||||
content.referer_header:
|
||||
default: same-domain
|
||||
type:
|
||||
name: String
|
||||
valid_values:
|
||||
- always: "Always send."
|
||||
- never: "Never send; this is not recommended, as some sites may break."
|
||||
- same-domain: "Only send for the same domain. This will still protect
|
||||
your privacy, but shouldn't break any sites."
|
||||
backend: QtWebKit
|
||||
desc: Send the Referer header
|
||||
|
||||
content.ssl_strict:
|
||||
default: ask
|
||||
type: BoolAsk
|
||||
desc: Whether to validate SSL handshakes.
|
||||
|
||||
content.user_agent:
|
||||
default: null
|
||||
type:
|
||||
name: String
|
||||
none_ok: true
|
||||
completions:
|
||||
# To update the following list of user agents, run the script 'ua_fetch.py'
|
||||
# Vim-protip: Place your cursor below this comment and run
|
||||
# :r!python scripts/dev/ua_fetch.py
|
||||
- - "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:53.0) Gecko/20100101
|
||||
Firefox/53.0"
|
||||
- Firefox 53.0 Win8.1
|
||||
- - "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101
|
||||
Firefox/53.0"
|
||||
- Firefox 53.0 Linux
|
||||
- - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101
|
||||
Firefox/53.0"
|
||||
- Firefox 53.0 MacOSX
|
||||
|
||||
- - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4
|
||||
(KHTML, like Gecko) Version/10.1.1 Safari/603.2.4"
|
||||
- Safari Generic MacOSX
|
||||
- - "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30
|
||||
(KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1"
|
||||
- Mobile Safari 10.0 iOS
|
||||
|
||||
- - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
|
||||
like Gecko) Chrome/58.0.3029.110 Safari/537.36"
|
||||
- Chrome Generic Win10
|
||||
- - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36
|
||||
(KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
|
||||
- Chrome Generic MacOSX
|
||||
- - "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
|
||||
Gecko) Chrome/58.0.3029.110 Safari/537.36"
|
||||
- Chrome Generic Linux
|
||||
|
||||
- - "Mozilla/5.0 (compatible; Googlebot/2.1;
|
||||
+http://www.google.com/bot.html"
|
||||
- Google Bot
|
||||
- - "Wget/1.16.1 (linux-gnu)"
|
||||
- wget 1.16.1
|
||||
- - "curl/7.40.0"
|
||||
- curl 7.40.0
|
||||
- - "Mozilla/5.0 (Linux; U; Android 7.1.2) AppleWebKit/534.30 (KHTML, like
|
||||
Gecko) Version/4.0 Mobile Safari/534.30"
|
||||
- Mobile Generic Android
|
||||
- - "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
|
||||
- IE 11.0 for Desktop Win7 64-bit
|
||||
|
||||
desc: User agent to send. Unset to send the default.
|
||||
|
||||
content.user_stylesheet:
|
||||
type:
|
||||
name: File
|
||||
|
@ -436,18 +436,18 @@ Feature: Various utility commands.
|
||||
## Custom headers
|
||||
|
||||
Scenario: Setting a custom header
|
||||
When I set content.custom_headers to {"X-Qute-Test": "testvalue"}
|
||||
When I set content.headers.custom to {"X-Qute-Test": "testvalue"}
|
||||
And I open headers
|
||||
Then the header X-Qute-Test should be set to testvalue
|
||||
|
||||
Scenario: DNT header
|
||||
When I set content.do_not_track to true
|
||||
When I set content.headers.do_not_track to true
|
||||
And I open headers
|
||||
Then the header Dnt should be set to 1
|
||||
And the header X-Do-Not-Track should be set to 1
|
||||
|
||||
Scenario: DNT header (off)
|
||||
When I set content.do_not_track to false
|
||||
When I set content.headers.do_not_track to false
|
||||
And I open headers
|
||||
Then the header Dnt should be set to 0
|
||||
And the header X-Do-Not-Track should be set to 0
|
||||
@ -458,14 +458,14 @@ Feature: Various utility commands.
|
||||
Then the header Accept-Language should be set to en,de
|
||||
|
||||
Scenario: Setting a custom user-agent header
|
||||
When I set content.user_agent to toaster
|
||||
When I set content.headers.user_agent to toaster
|
||||
And I open headers
|
||||
And I run :jseval console.log(window.navigator.userAgent)
|
||||
Then the header User-Agent should be set to toaster
|
||||
And the javascript message "toaster" should be logged
|
||||
|
||||
Scenario: Setting the default user-agent header
|
||||
When I set content.user_agent to <empty>
|
||||
When I set content.headers.user_agent to <empty>
|
||||
And I open headers
|
||||
And I run :jseval console.log(window.navigator.userAgent)
|
||||
Then the header User-Agent should be set to Mozilla/5.0 *
|
||||
|
Loading…
Reference in New Issue
Block a user