KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Switching Web connection modes
PRODUCT: 4D | VERSION: | PLATFORM:
Published On: September 3, 1999
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

While connected to the Web server, connection modes can be switched on the fly.

There are three ways to switch from contextual to non contextual:

1. Use the command "SEND HTML BLOB" and set the optional parameter to "True". The value of "True" will set the connection mode to non contextual.
2. Use the "SEND HTTP REDIRECT" command. When this command is called from the contextual mode it will close the Web process.
3. Call a URL using "/4DACTION". When 4D receives a URL request with "/4DACTION" in contextual mode, it will abort the context and return the resulting page in non contextual mode.

Switching from non contextual mode to contextual mode:

1. Calling a URL using "/4DMETHOD" will perform the opposite of "4DACTION". When 4D receives a URL request with "/4DMETHOD" it will create a context and execute the method indicated within that context.
2. Use the command "SEND HTML BLOB" and set the optional parameter to "False". The value of "False" will set the connection mode to contextual.

By default 4D's Web server will automatically create a context for any web connection. To initially connect to the Web server in non contextual mode modify the "Start without Context" setting in Database Properties.