marius
marius

Reputation: 329

How to refresh iframe when parent page is refreshed?

I have one iframe within parent page. People can navigate using iframe page. When parent page is refreshed iframe content reloads original src . What I need is when parent page is refreshed to refresh iframe too, but not the original src but what may be on the page on that very moment. Maybe someone has a better solution.

Thank you

Upvotes: 0

Views: 1160

Answers (1)

Amit
Amit

Reputation: 1385

You cannot do that as when parent page is refreshed, whole HTML along with original IFrame SRC will be returned from the server.

The only way to do so is, store the new SRC of IFrame in Cookies or Server Session and while serving the parent page from server, get this Cookie/Server Session value and based on that load the IFrame

Upvotes: 1

Related Questions