I am working on a usecase where harness/section has to be refreshed every 10 seconds automatically.
I don't have an answer to your question, but I do want to warn you that what you are doing can turn out to be surprisingly dangerous. With a refresh occurring every 10 seconds, the opportunity for the refresh to trigger while the Browser is simultaneously responding to some user action increases dramatically; depending upon the robustness of your UI, the two events can interfere with each other, leading to unexpected and nearly impossible to reproduce results. Almost always they will not interfere -- but the "almost" may cause you grief.
You don't say what release of Pega you are on, but in the releases below 7 the dangers increase dramatically.
You don't say what data is being presented that needs to be within-10-seconds current, but is it possible to introduce a manual refresh switch instead of the automatic refresh?
Thanks for your inputs as they are really helpful.
Application is built on Pega 719 and reason for this refresh is that we are building a monitoring portal for our client which will show status of multiple areas of the application. For ex. Avg Service response time throughout the day, status of db loading, status of vpn connectivity, marketing campaigns status, status of prpc nodes and couple more.
We are already using Pega PDC but to meet specific requirement we are building Pega portal in this regard. And to display right status all the time we need to apply refresh strategy.
Not sure if you are still looking for this but it may help others looking for real-time dashboard kind of solutions where they need to refresh the page after every fixed amount of time.
BTW, Pega 7.2.2 now has the capability to refresh using web sockets, so if you happen to have things on the DataPage that need to be refreshed, it is pretty easy now.
1. Create a section with non auto generated HTML.
2. Create a parm property refreshTime in the parameter page which will help in reuse. If not needed, just mention he time in seconds in the place of <%=tools.getParamValue("refreshTime")%> . Eg: content="60" for every minute refresh.
3. Use the html provided below as is in the HTML source of the section.