Morne
Morne

Reputation: 1743

iFrames in html5 more specifically in Epub3.0

This is more a theoretical question than a coding question. I am trying to create a epub, with some interactive components. Now to separate the code, I put each interactive component in a separate html file. Typical interactive components will be a questionnaire.

What will be the best way to link this to my epub, two options I am considering are:

Iframe - the interactive component will display as a part of the book, and users will seamlessly complete the activity.

External link - an Icon will be displayed in the book, which will serve as a link to a new page, this page will contain the interactive component.

I would like to keep the epub according to epub 3.0 standard.

Any suggestions or alternative solutions I can research?

Upvotes: 0

Views: 1271

Answers (1)

rkwright
rkwright

Reputation: 457

Either approach is compatible with the standard since external links are allowed and scripting within an iFrame is also allowed (known as scripting in a container).

The broader question is what are you trying to achieve? If the user is sent to an external page in a browser then the browser will have to post the results back to some server since the browser can't write the results back to disk or the EPUB.

It also depends on whether the EPUB Reading System is browser-based itself or an app. It is an app then in theory the app might know how to log info locally (though that would require jumping through some hoops that could have security implications.

So what is the goal here?

Upvotes: 1

Related Questions