• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

A.30 library(www_browser): Open a URL in the users browser
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(www_browser): Open a URL in the users browser
          • www_open_url/1
          • known_browser/2
          • expand_url_path/2
    • Packages
Availability::- use_module(library(www_browser)).(can be autoloaded)
Sourcewww_open_url(+Url)
Open URL in running version of the users’ browser or start a new browser. This predicate tries the following steps:

  1. If a prolog flag (see set_prolog_flag/2) browser is set and this is the name of a known executable, use this. The flag may be set to Command-Mode, where mode is one of fg or bg, requesting Command to run in foreground or background mode. Default is bg.
  2. Hand the URL to the desktop using desktop_open/2 from library(desktop) if this library is available. On Windows we use win_shell/2 if it is not.
  3. If a environment variable BROWSER is set and this is the name of a known executable, use this.
  4. Try to find a known browser.
ClioPatria (version V3.1.1-59-g7b9a7a3)