JBrowser Source Docs

jbrowser.engine.profiles

Generated from the source code of JBrowser 2.0.3.

jbrowser/engine/profiles.py · 343 lines

One isolated QWebEngineProfile per space.

Persistent spaces get their own storage + cache directories (cookies, localStorage, IndexedDB, service workers, HTTP cache, permissions). Incognito spaces use off-the-record profiles that keep everything in memory and leave nothing on disk once closed.

Constants#

Name Value
WA QWebEngineSettings.WebAttribute

ProfileManager#

class ProfileManager(QObject)source
ProfileManager(ctx: 'AppContext', parent: QObject | None=None)

ProfileManager.profile_for#

profile_for(space: Space) -> QWebEngineProfilesource

ProfileManager.get#

get(space_id: str) -> QWebEngineProfile | Nonesource

ProfileManager.reader_profile#

reader_profile() -> QWebEngineProfilesource

The profile reading mode shows articles in (ui/reader_view.py): in memory only, without JBrowser's page scripts (the article page has no ads to hide or forms to fill) and without cookies, so pictures load the same for everyone. It presents the same browser as the spaces.

ProfileManager.all#

all() -> list[QWebEngineProfile]source

ProfileManager.space_id_of#

space_id_of(profile: QWebEngineProfile) -> strsource

ProfileManager.release#

release(space: Space) -> Nonesource

Destroy a space's profile once its pages are gone; wipe its disk data if persistent.

ProfileManager.dispose_all#

dispose_all() -> Nonesource

ProfileManager.sync_user_scripts#

sync_user_scripts() -> Nonesource

ProfileManager.start_signin_fix#

start_signin_fix() -> Nonesource

"Fix and sign in again": present Firefox to every site until the Google sign-in has worked, then go back to the identity used before (see _on_signed_in).

ProfileManager.reinstall_scripts#

reinstall_scripts() -> Nonesource

ProfileManager.clear_cache#

clear_cache(space_id: str | None=None) -> Nonesource

ProfileManager.clear_cookies#

clear_cookies(space_id: str | None=None) -> Nonesource
clear_visited_links(space_id: str | None=None) -> Nonesource

Functions#

accept_language#

accept_language() -> strsource

Chrome-style Accept-Language from the Windows display languages, e.g. "en-AU,en;q=0.9". Qt sends none by default, and a browser without one looks like a bot.