Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Confluence Newbie - Best method to incorporate a Page Refresh

Christopher Meemken September 30, 2012

What would be the best method to incorporate a page refresh into a confluence page? Enable the HTML macro or can a user macro be used to run a page refresh similar to a <meta http-equiv="refresh" content="60"> URL ?

2 answers

1 accepted

0 votes
Answer accepted
MatthewC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 30, 2012

Hi Christoper,

The best way is to create a user macro which uses some JS. be careful with enabling HTML macro as it means anyone can out any kind of HTML code into a page.

here's the macro:

## Macro title: page-refresh
## Macro has a body: N
## Body processing: N/A
## Output: Selected HTML
##
## Developed by: Matthew Cobby matt@andamooka.com

## Refreshes the current page after a configurable number of seconds.
## @param Period:title=Refresh period|type=string|required=true|desc=How many milli-seconds before the page should refresh. e.g. 5000ms = 5s
&lt;script type="text/JavaScript"&gt;
&lt;!--
	setTimeout("location.reload(true);",$paramPeriod);
//   --&gt;
&lt;/script&gt;

There was an earlier version of this script here: https://answers.atlassian.com/questions/4757/periodic-refreshing-in-macro

0 votes
Christopher Meemken October 1, 2012

Thanks Matthew. That works perfect. I didn't want to activate the HTML macros for the reasons as you stated but I was unsure how to incorporate java script into a user macro. I'll have to spend some time to learn to utilize them better.

Thanks again,

Regards,

Chris Meemken

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events