Once your DataPages have been created, you will need to deploy them to make them accessible to your users. Several deployment methods are available to choose to meet your specific requirements.

Steps to Deploying a DataPage:

  1. In the DataPages listing page, select the DataPage and click on Deploy. This opens the deployment dialog.
  2. Click Enabled if this is the first time deploying this DataPage. It changes the Deployment Status of the DataPage and makes it accessible outside Caspio Bridge

  1. Select your preferred deployment method.
    • Embed – This is the most popular deployment method. Embedding a DataPage in an existing web page gives you control over the presentation of the DataPage and the layout of your web page. This method requires JavaScript on the user’s browser, which is a standard feature on all modern browsers.
    • URL – A URL is the quickest way to share a DataPage. You can copy the URL and place it on any website or in an email. If you choose the Link option under URL, the URL is automatically wrapped around the DataPage name.
    • Frame – Frame and iFrame deployment options are useful when for any reason the Embed method is not preferred. A DataPage deployed in a Frame or iFrame does not interact with its container page content. Therefore it is not a good approach if your DataPage is receiving parameters. You can further enhance the provided code snippet to give the Frame a specific height, width, border, background color, etc. Here you can find more information about iFrame attributes.
    • .NET – Use the Dot Net deployment method for deploying into SharePoint, aspx, C# and VB.Net pages only.
    • WordPress – Use this option if deploying into your own installation of WordPress. Note that this option works with Caspio Plugin for WordPress. For wordpress.com sites use URL deployment method because wordpress.com does not allow JavaScript, Frame or iFrame code. Learn more about deploying into WordPress here.
    • SEO – This option is only available for Report DataPages with pre-defined criteria (i.e. no search form) and HTML DataPages. This method allows Search Engine Optimization (SEO), because the search engines will be able to index your database content. Note that SEO deployment is available in select plans and sometimes as an add-on. If this feature is not available in your plan the option will never become visible. For more information about SEO deployment, see SEO Deployment Guidelines.
  2. Encryption – For data security reasons, the deploy code of all DataPages are automatically offered in HTTPS protocol.
  3. Click into the deploy code area and copy the code (using CTRL-C or Command-C keyboard shortcuts) and paste this code into the source of your web page using an HTML or text editor. Note that you should not be pasting the code into a WYSIWYG editor, but into the source code of the page.

Your deployed DataPage will only work properly when its host page is served by a web server. Upload your page to your web server if needed and then verify your deployment.

IP Filtering

You can restrict access to your DataPage by specifying one or more IP addresses or address ranges. The default behavior of the DataPage can be set to Allow All or Deny All and the list of exceptions can be entered.

deployment_2

IP masks can be entered using asterisks in place of the IP part, as follows:

10.10.0.*
10.10.*.*
10.*.*.*

Asynchronous Deployment

Asynchronous deployment is a capability in the Embed, .NET and WordPress/Embed DataPages deployment methods which were added in Release 10.0. DataPages created and deployed prior to this version may continue to be re-deployed using the legacy embed deployment method. However, we recommend using the option specifically provided for older DataPages and re-deploy with Asynchronous Deployment enabled.

When switching from legacy deployment method to asynchronous method, existing JavaScript customization code in your DataPages must be updated if it contains any of the following:

  • document.write() is no longer supported. You will need other methods to output your data (i.e. innerHTML, alert()).
  • window.onload() and other page loading events are no longer supported. You must use the Caspio built-in JavaScript event as shown below.

If your script contains onload event similar to the one here:

<script type="text/javascript">
window.onload = function() {
// do something
});
</script>

The onload event should be replaced with Caspio built-in event as shown below:

<script type="text/javascript">
document.addEventListener('DataPageReady', function (event) {
// do something
       
});
</script>

You can also use event.detail.appKey or event.detail.uniqueSuffix to specify which DataPage’s loading event to execute your functions using the example below:

<script type="text/javascript">
document.addEventListener('DataPageReady', function (event) {
       if (event.detail.appKey == 'MY_DATAPAGE _APPKEY') {
              //do something 
       } else if (event.detail.appKey == 'MY_WEB_FORM_APPKEY') {
              //do something
    }
});
</script>

Related articles: