Update the iframe without re-rendering the entire page.

Skip to first unread message

Ruturaj Kanake

Oct 24, 2021, 8:13:29 AM10/24/21
to Chromium-discuss
Is there any way to stop the page execution just after the page is refreshed or URL is changed and also get the URL where the user wants to go?

Currently, what I am doing is using the chrome.tabs.onUpdated API to get the changed URL, and then I am calling chrome.tabs.update API. But this seems to update the entire page and not just the iframe.

I want to achieve that whenever a refresh call or URL is changed in the URL bar, I only want to update the iframe element and not the entire page.


Jon Perryman

Oct 26, 2021, 1:09:35 PM10/26/21
to ruturajk...@gmail.com, Chromium-discuss
I'm not sure what you are asking. I assume you are talking about JavaScript but you don't mention if the IFRAME is in the same tab or another tab. I'm guessing the javascript is running in another tab as the IFRAME.

You will run into some security restrictions with IFRAMEs because they seamlessly combine 2 pages into a single page from the user's perspective. Imagine you design a page with an IFRAME that contains a login screen. Changing the URL in this IFRAME from another tab is restricted because anyone could easily spoof your login iframe to get userid and password. The designer of a page must always be guaranteed predictable results with very few exceptions.

Maybe you should have a javascript that updates the IFRAME object owned by that script instead of using the tab api.

Regards, Jon.

Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.
Reply all
Reply to author
0 new messages