Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence page with dynamic content only refreshes in browser, not when queried via API

Jan van der Watt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 15, 2024

I have a few pages that combine and process other Confluence pages using some or all of:

* Table Transformer

* Page Properties report

* Table Excerpt Include

I find that when I make manual data entry updates to the source of those tools, the calculated content is only refreshed when the page containing the calculations is viewed in a web browser.

I.e., if I make updates on the source pages, and use the REST API to query the calculated page from a script (e.g. https://confluence.XYZ/rest/api/content/760043385?expand=body.export_view) the content is not up to date. It also does not update if this request is made in a browser.

I've also tried fetching the calculated page from the script as if I were a browser, e.g. https://confluence.XYZ/pages/viewpage.action?pageId=754347379, and passing [NoCache = true] in the header. Still no luck.

As soon as I visit the page in a browser (or hit F5 to refresh it), the API query returns updated data.

Is this behaviour as expected, or is there something I am not doing that will make the API content as fresh as the browser's content?

The C# code looks something like this:

using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", personalAccessToken);
client.DefaultRequestHeaders.CacheControl = new CacheControlHeaderValue{NoCache = true};
var pageUrl = confluenceRestApiBaseUrl + pageId;
if (!String.IsNullOrEmpty(parameters))
{
pageUrl += "?" + parameters;
}
var response = await client.GetAsync(pageUrl);
response.EnsureSuccessStatusCode();

var json = await response.Content.ReadAsStringAsync();
}

2 answers

1 accepted

3 votes
Answer accepted
Stiltsoft support
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.
February 19, 2024

Hi @Jan van der Watt ,

The behavior is an expected one: the updates should be rendered in a browser. You may try to create a script that may automatically open your browser and refresh the required page.

0 votes
Sophie DO KHAC
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 28, 2025

Hello @Jan van der Watt

I have the same issue than you. Have you been able to solve it?

There is one point that is not clear to me:

- the support team says to try to create a script that may automatically open the browser and refresh the required page,

- and I think it is what you did when you say "I've also tried fetching the calculated page from the script as if I were a browser, e.g. https://confluence.XYZ/pages/viewpage.action?pageId=754347379, and passing [NoCache = true] in the header. Still no luck."

Thank you in advance for any comment, have a nice day.

Sophie

Jan van der Watt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 4, 2025

Hi @Sophie DO KHAC,

I changed companies in Dec 2024, so I no longer use Confluence.

Hope you can find a solution to this issue.

Cheers.

Jan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events