Kakadu is a platform designed to foster inclusion, enabling businesses in both the private and public sectors to develop instructional materials aimed at enhancing their customers' digital literacy. Additionally, it empowers users to effectively utilise contemporary everyday technology.
Kakadu offers the ability to embed our proprietary step-by-step viewer on your own web page. It is done by mounting an iframe on your own webpage and pointing the src attribute to our domain and your preferred recipe.
Kakadu provides a special URL resource optimised for embedding. The URL structure is as follows:
https://www.kakadu.no/{companySlug}/{recipeSlug}/embed
https://www.kakadu.no/bankid/slik-aktiverer-du-bankid-appen-p-android-med/embed
Append “/embed” at the end of a conventional Kakadu recipe URL and you’ll be taken to the optimised view.
A typical implementation looks like this:
<iframesrc=“https://www.kakadu.no/bankid/slik-aktiverer-du-bankid-appen-p-android-med/embed" loading="lazy" width="100%" height="580px" frameborder="0" scrolling="no"></iframe>
The way you trigger or display the iframe is up to your own implementation. Here are two common examples of “inline” and “modal” views.
Figure 1: Example of inline implementation
Red: A website controlled by implementer
Green: Example of button that triggers modal with an iframe
Yellow: An inline embed of the recipe viewer
Figure 2: Example of modal implementation
Red: Controlled, designed and implemented by customer.
Yellow: Recipe viewer in an iframe embed controlled and delivered by Kakadu
You can change some colours of the iframe using backgroundColor
and accentColor
as paramaters in the URL. Either colour keyword as supported by the html spec or a url encoded hex string. Eg: the hashing (#) needs to be %23
<iframe src="https://www.kakadu.no/bankid/slik-aktiverer-du-bankid-appen-med-kodebrikke/embed?backgroundColor=%23FF0000&accentColor=%230000FF" loading="lazy" width="100%" height="580px" frameborder="0" scrolling="no"></iframe>
In the context of embedding third-party content, such as Kakadu's iframe, certain security considerations are paramount to ensure the integrity of both the embedding site and the embedded content.
One of the primary concerns is the risk of Cross-Site Scripting (XSS) attacks. To mitigate this, it is crucial that the source of the iframe (the 'src' attribute) is from a trusted and secure domain. Kakadu provides such a domain, ensuring that the risk of malicious scripts being introduced into your webpage is minimized.
Clickjacking is another security threat where an attacker tricks a user into clicking on something different from what the user perceives. To combat this, the use of frame-busting tactics is recommended. This prevents the content from being embedded into potentially harmful sites. Kakadu's iframe embeds are designed with security in mind to prevent such misuse.
For websites served over HTTPS, it is essential to ensure that all embedded content, including iframes, is also served over HTTPS. This practice prevents mixed content warnings and vulnerabilities, ensuring a secure communication channel between the embedding site and the embedded content.
Iframes provide a level of isolation from the parent page, which is crucial for data privacy. This means sensitive data present on your main site is not accessible to the embedded iframe. Kakadu respects this isolation principle, thereby ensuring that data privacy is maintained.
Staying informed about any updates or changes to the Kakadu platform that might affect security is critical. Regular updates ensure that the embedded iframes are in alignment with the latest security standards and practices.
An iFrame (Inline Frame) is an HTML element that allows you to embed another HTML document within a current HTML document. This is particularly useful for inserting content like videos, maps, or even interactive applications into web pages. The content inside an iFrame is independent of the main page's content and can have its own scroll bar, or be seamlessly integrated.
To create an iFrame, use the <iframe> tag in your HTML document. The basic syntax is as follows:
<iframe src="URL_of_the_page_you_want_to_embed" width="500" height=“300"></iframe>
src: Specifies the URL of the page to be embedded.
Width and height: Define the dimensions of the iFrame.
You can customize the iFrame using various attributes:
frameborder: 0 (no border) or 1 (border).
scrolling: yes, no, or auto (browser decides).
allowfullscreen: Enables full-screen mode if set to true.
sandbox: Applies extra restrictions to the content in the iFrame.
<iframe src="URL/embed" loading="lazy" width="100%" height="550px" frameborder="0" scrolling="no"></iframe>
You can style iFrames using CSS, like any other HTML element. For instance, to add a border or set margins:
iframe {
border: 1px solid black; margin: 10px;
}
To create an iFrame, use the <iframe> tag in your HTML document. The basic syntax is as
follows:
<div class="iframe-container">
<iframe src="URL" frameborder="0"></iframe> </div>
.iframe-container {
position: relative;
padding-bottom: 56.25%; /* Aspect ratio */ height: 0;
overflow: hidden;
}
.iframe-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
Should you have any issues implementing your recipe from Kakadu? Feel free to reach out if you're experiencing any troubles with the implentation and/or documentation. Please contact your customer contact, Tina Rødland at: tina@kakadu.no.