Notifications
Clear all

Hide iframe source

17 Posts
2 Users
0 Reactions
2,905 Views
TinyWebGallery
Posts: 924
Admin
(@admin)
Prominent Member
Joined: 16 years ago

Not sure what you mean with "scoop". 
The page in the iframe has more links you mean? and they can be copied?

what is possible is that the ai_external.js script is added to such a page. The page itself is hidden. only once the full script is loaded it is unhiding the page. 

there is a document.documentElement.style.visibility = 'visible'; in the code. if you have a css which hides the <html>.

But still people can turn off Javascript and view the page source and copy what they need...

Best regards,

Michael

Reply
Posts: 11
Topic starter
(@james)
Active Member
Joined: 4 years ago

Right now if someone right clicks on my iFrame they can load the page where it comes from. i want to prevent that. My goal is to have the page load in the iframe and not be accessible anywhere else. Perhaps iFrames aren't the best way to do what I'm doing, but I can't embed my script directly in the page people are seeing. I have the script run on a separate page consisting of only the script (this is the page I want hidden) and then I embed this page into the main page using iFrame. I don't know if that makes sense. Any advice would be great. I upgraded to pro but still can't figure it out. 

Reply
TinyWebGallery
Posts: 924
Admin
(@admin)
Prominent Member
Joined: 16 years ago

you will never able to protect your src here. The only option is what I have written. your page to "protect" has the ai_external.js in. This checks if the page is in an iframe or not. In case not you redirect the user to your parent page the user might have to log in.

By default the page in the iframe is set to not visible by css. So even when users turn off Javascript they would not see anything in the beginning. 

Still everyone who knows the developer tools can copy things, change the css back and so on. So you will only protect your page against normal users. Everything else is not possible. 

Best regards,

Michael

Reply
Posts: 11
Topic starter
(@james)
Active Member
Joined: 4 years ago

Thanks, Michael. Can you walk me through setup? I tried to enable that for my page here but if you right click on the frame you are still shown the original page that has been embedded and not the parent page. Do I need to have the embedded content located on the parent page as you did in your tutorial?

Reply
TinyWebGallery
Posts: 924
Admin
(@admin)
Prominent Member
Joined: 16 years ago

You missunderstood. It is not about that you don't see the original page! It is about that you are not able to load the original page without the parent.

Reply
1 Reply
(@james)
Joined: 4 years ago

Active Member
Posts: 11

@admin right but as it is right now, I can load the original page on its own without the parent. I guess it’s not possible but thanks anyway!

Reply
Page 2 / 4