uncaching iframe data not working

Posted 1 month ago by nhayder

in my app a user can preview his personal page as it looks on phone and tablet and desktop computer , i'm loading a view inside and iframe to simulate multiple screen sizes.

<iframe src="/"></iframe> // this loads personal page of user as phone size

the iframe is doing its job perfectly and working fine, until a user change some settings on his personal page, then when he tries to preview it? iframe is still shows previous information inside the iframe.

the personal page has some caching already so using axios i'm clearing the cached files directly from controller.

Artisan::call('cache:clear');

The cache files are removed and axios is working as expected but, unfortunately, iframe is still showing old data every time, The only way i can see the new changes is when i refresh the page.

it looks like cache:clear is not uncaching the iframe data as expected, until i refresh the page.

so how to force my iframe to clear cached data without refreshing the page

any ideas???

Please sign in or create an account to participate in this conversation.