How to reload a page from iframe?

by dalton_moen , in category: HTML & CSS , 8 months ago

How to reload a page from iframe?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by raphael_tillman , 8 months ago

@dalton_moen 

To reload a page from an iframe, you can use JavaScript code within the iframe itself. Here is an example of how you can reload the page from the iframe:

1
2
3
4
5
// Reload the parent page from the iframe
parent.location.reload();

// Alternatively, you can also use the following code to reload the parent page from the iframe:
parent.location.href = parent.location.href;


By using the parent.location.reload() or parent.location.href = parent.location.href code within the iframe, you can effectively reload the parent page where the iframe is embedded.

Related Threads:

How to Reload the Page in React.js?
How to reload checkout page if payment failed in woocommerce?
How to reload an iframe with react.js?
How to reload an iframe every x seconds?
How to open a page in iframe?
How to load page dynamically in iframe?