Notifications
Clear all

ReturnURL caching in iframe on iPads

12 Posts
2 Users
0 Likes
169 Views
Posts: 11
Topic starter
(@ianhomewood)
Active Member
Joined: 1 year ago

Hi

I have a really bizarre problem with which I am hoping you can help.

We are using Advanced iFrame to integrate a membership system into our website.  It works really well, apart from one minor issue on iPads (which I believe to be an Apple issue not an Advanced iframe issue).

On iframe delivered pages which require a member to be logged in, there is a login button which takes the user to a login screen and then uses ReturnURL to deliver them back to the original page, all within the iframe.

On Windows and Android this works perfectly.  On iPads, when the user is returned to their original screen it doesn't refresh.  They have to manually refresh the page to see the logged in state.

Now here is the bizarre bit.  In our test environment it also works perfectly on iPads!  The test environment was created using WP Staging and the only difference to live was that caching is disabled in wp-config.  Thinking that was the problem I also disabled it in live to check, but it still doesn't work.

When we implemented this solution we had to make some changes in our DNS, to set the 3rd party domain for the membership system as a sub-domain of our main domain.  Our live domain is southportu3a.org.uk, with the membership pointing to sm.southportu3a.org.uk.  Our staging site is at southportu3a.org.ul/spt-u3a-testing, pointing to the membership system at smtest.southportu3a.org.uk.

When we run this functionality directly within the membership system pages the ReturnURL works perfectly on all devices, so the difference has to be in WordPress or the iFrame. I have been told that Apple have some fairly comprehensive Cross Origin Restrictions relating to iframes, so I'm hoping somebody may be able to point me in the right direction to solve this.

To be clear, it looks as if iPads are caching the iframe, even though the Wordpress page is not necessarily cached, but only in our live environment.

Does anybody have any helpful tips?

Thanks

Ian

11 Replies
TinyWebGallery
Posts: 880
Admin
(@admin)
Prominent Member
Joined: 15 years ago

Are you able to add a random token to the return url? Which is not needed by the webpage and prevents caching? 

For caching in general I have added {timestamp} as placeholder in the url. 

e.g. www.test.com/test/?t={timestamp} will create a different link each time you open the page. Stil the returnUrl is not affected. Maybe disabling the caching at the initial call also affects this.  Give it a try.

Best regards, Michael

 

 

Reply
Posts: 11
Topic starter
(@ianhomewood)
Active Member
Joined: 1 year ago

Unfortunately that hasn't made a difference. It's as if it isn't even looking at the URL, just displaying whatever was there before.

Why do Apple always make things so difficult!

Reply
Posts: 11
Topic starter
(@ianhomewood)
Active Member
Joined: 1 year ago

Is there a way to force the iframe to reload on return?

Reply
TinyWebGallery
Posts: 880
Admin
(@admin)
Prominent Member
Joined: 15 years ago

Have you added non caching headers to your page? 

And have you added a random attribute to the return url?

Best regards, Michael

Reply
Page 1 / 3