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

SWI-Prolog HTTP support
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog HTTP support
        • Introduction
        • The HTTP client libraries
        • The HTTP server libraries
        • Transfer encodings
        • library(http/websocket): WebSocket support
        • library(http/hub): Manage a hub for websockets
        • Supporting JSON
        • MIME support
        • Security
        • Tips and tricks
        • Status

10 Tips and tricks

  • URL Locations
    With an application in mind, it is tempting to make all URL locations short and directly connected to the root (/). This is not a good idea. It is adviced to have all locations in a server below a directory with an informative name. Consider to make the root location something that can be changed using a global setting.

    • Page generating code can easily be reused. Using locations directly below the root however increases the likelihood of conflicts.
    • Multiple servers can be placed behind the same public server as explained in section 3.14.7. Using a common and fairly unique root, redirection is much easier and less likely to lead to conflicts.

  • Debugging
    Debugging multi-threaded applications is possible using the graphical debugger. This implies requires that the xpce extension package must be installed. Spy-points may be placed using tspy/1.

ClioPatria (version V3.1.1-40-g9d9e003)