javascript - Don't let the parent website, get info from my iFrame -


i have make iframe manage user's sensible information. need parent page not able information it. can recommend me achieve goal?. saw how obfuscate javascript code, not enough need impossible have access website iframe's values inside fields user fill up.

for example try making own frame , web test security , if put on web: iframename.document.getelementbyid("idtextfield").value; text client filled, thats want prevent, impossible (or difficult) web data of fields have in iframe.

thank all.

by way im using html, js , php

all modern browsers prevent site getting iframe content doesn't belong it. security feature prevent hacking.

for example, if log bank's website , go site includes bank in iframe, may see bank page in iframe, third party site still not able read it.

furthermore, bank not appear in frame begin because many sites (including stackoverflow) prevent iframes displaying them.

assuming iframe isn't in same domain containing app , doesn't need communicate with other app, don't need special.

if do need communicate between windows/frames in different domains, can use window.postmessage() api pass data between them. api allow decide how use messages while retaining control of page. (protip: don't eval passed messages.)


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -