Skip to content

Client options

Eric M. edited this page Aug 24, 2025 · 11 revisions

Xows provides global options that allow you to customize some aspect of the application behavior. Here are the detailed explanation of each of them.

Library base options

lib_path

"lib_path"            : "/",          //< Path to XOWS files (relative to HTTP base URL)

This the path to subfolder where client browser can found (download) application asset files. This path is appended to Web Portal base URL. For example, if the web portal is accessible at the URL https://example.org/ and this option set to "/path/to/xows/files", asset files will be downloaded at https://example.org/path/to/xows/files/.

lib_verbose

"lib_verbose"         : 1,            //< Console log verbosity level from 0 (nothing) to 3 (too much)

This define the verbosity level of the application in the browser console. It can be set from 0 to 3:

  • 0 : Disable all output except fatal errors.
  • 1 : Warnings and fatal errors only.
  • 2 : All application logs.
  • 3 : Application logs and every XMPP/WebSocket communication data. This level is debug purpose only.

Asset download options

tpl_load_mincss

"tpl_load_mincss"     : true,         //< Load minified CSS theme file (disable it for theme edit/debug purpose)

This indicates to load the style.min.css file rather than style.css file from the selected theme. Unless you use your own theme that does not provide a style.min.css this option should preferably still enabled. This may however be used for development or debugging purpose.

tpl_force_uncache

"tpl_force_uncache"   : false,        //< Prevent browser cache (force reload assets by appending URL suffix)

This indicates to append random prefixes to all URL used to download asset files, in the fashion /asset.html?x9lmb7 to ensure browser will not use its cached data. Unless for development or debugging, this option should be disabled.

User Login options

login_force_domain

"login_force_domain"  : "",           //< Optional domain to append (enforce) to XMPP login username

This is used to enforce the XMPP host domain for users login. Setting this option allow user to simply enter an username rather than their full XMPP address (JID), the value specified in this option will then be automatically appended to its entered username. For example is you specify example.org, when user login using hector username, Xows will actually use the [email protected] JID as login. This option also apply for user registration.

login_sasl_store

"login_sasl_store"    : false,         //< Allow SASL authentication data storage for auto-login

Enables SASL authentication data to be saved in browser's local storage to allow automatic login feature. If this options is disabled, the automatic login feature will be possible only on browsers that implements the proper feature of the Credential Management API (mostly, WebKit based browsers). Also, for security reasons, authentication data storage is allowed only for the SCRAM-SHA-1 and the (deprecated) DIGEST-MD5 mechanisms. It will not work with PLAIN mechanism.

login_fail_delay

"login_fail_delay"    : 2,            //< Anti-bruteforce temporization delay (seconds) after each failed login attempts

This defines the delay, in seconds, Xows waits before showing an error and allowing user can try to login again in case of login fail. XMPP servers usually reply very quickly on user login fail, this may look strange to users, this also allow some flood or brute-force attack. This option allow to set a fake loading time that temporize failed login attempts.

Connection recovery options

resume_timeout

"resume_timeout"      : 5,             //< Delay (minutes) before definitive abortion of connection recovery

This define the timeout, in minutes, after which Xows will abandon connection recovery and returns to login page (showing connection error message).

resume_try_delay

"resume_try_delay"    : 5,             //< Connection recovery delay (seconds) to wait between each attempts

This define the delay, in seconds, Xows waits between each reconnect attempts during the connection recovery process. This delay apply right after connection loss, that is, if Xows encounter abnormal socket close, it will waits this delay before trying to reconnect. Notice that browser may apply a throttling mechanism that will actually make this delay longer after several failed attempts.

Interface (GUI) options

gui_theme

"gui_theme"           : "dark",         //< Interface theme (folder within /theme subdirectory)

Specifies the GUI theme subfolder. This is where Xows will seek to download asset files for GUI interface. Theme (GUI) asset files has to be located in a subfolder within the \theme subfolder, this options specify that subfolder, it is used to complete the path to files. Currently there is only one available theme: dark.

gui_locale

"gui_locale"          : "en-US",        //< Preferred Localization (among available ones)

Specifies the Locale to use for GUI. This is used for some browser related features, but above all to download translation JSON database and setup related mechanisms. You can set this option to the locale you want, however if translation JSON database doesn't exists for this locale, the default (english) will be used to display GUI texts.

gui_allow_register

"gui_allow_register"  : true,           //< Allow XMPP account register via Login page

This enables or disable link for user registration in the login page, allowing users to register new account to XMPP server. Unless this option is set to true, user cannot access to Registration page.

gui_archive_delay

"gui_archive_delay"   : 500,            //< Delay (milliseconds) to validate fetch for older history messages

Specifies the delay, in milliseconds, to validate a query to the XMPP server for more archived messages. When user scroll up to fetch older messages which are not currently loaded, Xows waits for user to stays at the top of history during the specified delay before actually send a query to gather more messages. That is, if user only quickly go up and back down right after, query is not sent.

Client behavior options

cli_archive_count

"cli_archive_count"   : 50,             //< Minimum count of history message to fetch each iteration (MAM query)

Specifies the minimum count of (visible) chat history archived message to gather for each query. Notice that this is a minimum and not a maximum, because query mechanism may, in some circumstances, collect a little more message than requested (but never more than available of course).

cli_avat_autopub

"cli_avat_autopub"    : true,           //< Auto-publish the default generated Avatar if none exists for user

Indicates to publish the default user avatar image generated by Xows if none is available. User avatar image is stored in and managed by the XMPP server, however, for aesthetic purposes Xows generates local default avatar images to be displayed if none is available from server. If this option is enabled and if user doesn't have any avatar available in the server, this default avatar image (with a pretty Xows logo) will be automatically published to the XMPP server to actually become the user XMPP avatar (that is, not only locally).

This allow to keep consistency in displayed default avatars within the Xows web client itself for those who use Xows (since default generated avatar may change color depending context). However, notice that once avatar is published, it will be displayed to all other XMPP users independently the client they use.

Client features

cli_pepnotify_bkms

"cli_pepnotify_bkms"  : true,           //< Request for Native Bookmarks (XEP-0402) PEP notifications

If enabled, this indicates to the XMPP server that the client (Xows) want to receive Native Bookmarks (XEP-0402) notifications.

Notice that this option only enable or disable incoming notifications and does not disable the Native Bookmarks (XEP-0402) feature. This option may be disabled to lower network traffic.

cli_pepnotify_nick

"cli_pepnotify_nick"  : true,           //< Request for User Nickname (XEP-0172) PEP notifications

If enabled, this indicates to the XMPP server that the client (Xows) want to receive User Nickname (XEP-0172) notifications.

Notice that this option only enable or disable incoming notifications and does not disable the User Nickname (XEP-0172) feature. This option may be disabled to lower network traffic.

cli_pepnotify_avat

"cli_pepnotify_avat"  : true,           //< Request for User Avatar (XEP-0084) PEP notifications

If enabled, this indicates to the XMPP server that the client (Xows) want to receive User Avatar (XEP-0084) notifications.

Notice that this option only enable or disable incoming notifications and does not disable the User Avatar (XEP-0084) feature. This option may be disabled to lower network traffic.

External services

cli_extern_services

// Manually defined XMPP External Services
"cli_extern_services" : [ { type:"stun",                      
                            transport:"udp",
                            host:"stun.example.net",
                            port:"3478" },

                          { type:"turn",
                            transport:"udp",
                            host:"turn.example.net",
                            port:"3478",
                            secret:"7d77f8a6ac0bc041959af2abe460" } ]

This options allow to specify external services information that are not part of the XMPP protocol but may be required for some features.

Currently, the only external service that Xows may need are STUN and TURN servers for Media Call sessions (via WebRTC). If the XMPP server does not provides such information, or if you want to add more, you can specify it there. External services information must be provided as the example above, an array of dictionary objects.