Hello all, is it possible to enable auto refresh on one page only?
In our case it is a calendar page, when customer clicks on an empty slot asset builder loads up, next they fill in the form and submit it (it's a booking that they create) the "created" page has a thank you message and a link back to a calendar page.
Problems 2 fold:
1 Calendar page gets cached (even if caching turned off) by browser and reservation that just been made not visible, so we need auto refresh on a calendar page. Also there is a possibility that 2 people click on the same slot simultaneously and create booking for the same time it is unlikely, however to minimise this happening autorefresh would help.
2 Asset builder created screen, when customer arrived on this screen after successfully creating booking clicking browser refresh will create duplicate asset so we need delayed redirect back to calendar page.
Any solutions?
Hi Eric,
The solution to problem 2 would be putting some javascript into the created bodycopy
The solution to problem 1 is similar
You can either use meta tag to refresh your calendar page every several seconds
or use javascript
Note, the meta tag can only be put inside the <head> element i believe, but you can put the JS inside the calendar page main bodycopy. Let me know if it works for you.
A couple of quick ideas/hacks: try redirecting them to the page you want, but add a query string at the end of the URL to try and trick the browser into not caching, or redirect them to the _nocache version.
Thank you all for your help. I wasn't sure if I can add something to the head tag only for that page and it seems that you can't.
The link on created screen already has /_nocache in it, but a calendar asset is special it passes dates as a variables in URL and nocache doesn't work after variables
Huan, pardon my ignorance about second javascript what does it do? Is there any way to set a delay on redirect? Can't I just use the same Javascript as first one just with the same URL?
Thanks again for all your help I am learning… 
yes probably you can't add the meta tag to the page unless you have a specific design for the calendar page. And yes you can use the same javascript as the first problem, actually just use the first javascript piece. The 5000 value in there mean a delay of 5 seconds, you can adjust it accordingly.
Thanks, I thought so