Ashkan
Ashkan

Reputation: 3

How to load a page in iframe with JavaScript disabled?

I searched the internet about this subject but I didn't find anything about it. Please guide me how is it possible?

For example:

<iframe id="iframe1"
        src="Source Link"
        width="890"
        height="640"
        frameborder="0"
        scrolling="no"
        allowfullscreen></iframe>

Upvotes: 0

Views: 1781

Answers (1)

erikvimz
erikvimz

Reputation: 5476

You are looking for sandbox attribute.


In your particular case use:

<iframe id="iframe1"
        src="Source Link"
        width="890"
        height="640"
        frameborder="0"
        scrolling="no"
        allowfullscreen
        sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-top-navigation"></iframe>

This re-enables all iframe features except for Javascript.

Upvotes: 2

Related Questions