Display Messages with Static Source

Display Messages with Static Source

The Display Messages with Static Source feature determines how the iframe content is loaded for on-site messages. There are two supported methods for iframe integration depending on whether this feature is enabled or disabled.

How to Access and Enable the Feature

  1. Go to the Settings:
    • Navigate to Settings..
  2. Access the Integrations Section:
    • Under Integrations, go to Applications to manage your app settings.
  3. Click the "New" Button:
    • On the Applications page, you will see a button labeled New.
  4. Select "Website" as the type:
    • When the new screen opens, choose Website as the type.
  5. Enable "Onsite Messaging":
    • In the settings for the website integration, find the option labeled Onsite Messaging.
    • Enable this option to allow you to display messages on the site.
  6. Enable or Disable "Display Messages with Static Source":
    • You will now see the "Display Messages with Static Source" setting
      • Enabled: Web SDK will use an initiator file as src on iframes, this helps when the website does not allow data:text/html in src attribute.
      • Disabled: Web SDK will use data:text/html as src on frames.

Methods

1. Default Method (Feature Disabled)

This method is applied when the Display Messages with Static Source feature is disabled.

It is the method where the iframe’s src attribute starts with data:text/html followed by the HTML of the onsite content, placed using uriencoding.

2: New Method (Feature Enabled)

This method is applied when the Display Messages with Static Source feature is enabled.

In this method, the src attribute of the iframe includes the URL of a common file:
https://{CDN_DOMAIN}/onsite-initiator/index.html
This file receives the HTML of the onsite content as a message and displays it inside.

Some users have a Content Security Header defined on their website.
This header includes a frame-src rule, which controls what values are allowed in the src attribute of an iframe.

For the data:text/html method to work, the frame-src rule must include the value data:*.
However, in certain cases, customers may choose not to include it due to their internal security policies or preferences.

To support such scenarios, we introduced this new method.

What is Content Security Policy (CSP)?

Content Security Policy (CSP) is a security feature that helps protect websites from certain attacks, mainly Cross-Site Scripting (XSS) and Clickjacking. CSP tells a web browser what it can and cannot load from different sources, providing an extra layer of protection.

CSP and the "Display Messages with Static Source" Feature

Display Messages with Static Source controls how messages are shown inside an iframe on a webpage.

  • If the feature is disabled, the iframe uses data:text/html (which is a method of embedding HTML directly into the iframe).
  • If the feature is enabled, the iframe loads its content from a URL hosted on a trusted server such as CDN.
    • Related Articles

    • Remote Source

      Is it possible to integrate my Google BigQuery database with the tables in D-engage? Yes ✔️ , the connection between your Google BigQuery database and your tables in D-engage is feasible. Once the linkage is established, you will gain access to and ...
    • Customization in Transactional Messages

      For Transactional Email, SMS, and Push, customization works differently compared to campaign-based content. Master contact and device columns are not used in transactional messages. Transactional sends are triggered via REST API. When making the API ...
    • Applications

      The Settings section in Dengage offers a variety of tools to manage and integrate different aspects of your account. One important feature is the ability to integrate applications within the platform. This functionality provides an overview of ...
    • Dynamic Content & Customization

      What is dynamic content? Dynamic content refers to content that adapts based on user data, preferences, or behaviors. Unlike static content, dynamic content is flexible and responsive, allowing users to display personalized information for different ...
    • Product Box

      The On-Site Product Box is a visually engaging notification displayed on specific areas of a website. It is designed to showcase products, campaigns, or promotions with a combination of visuals and text. Static Product Box can be used both in flow ...