Topic on Extension talk:Include

Jump to navigation Jump to search

Included file doesnt update (solution: new keyword 'nocache')

Peachey88 (Flood) (talkcontribs)

When I include a local file, it only updates when I edit and save page. How can I get it to update by just reloading the page?

This post was posted by Peachey88 (Flood), but signed as

Peachey88 (Flood) (talkcontribs)

This is a limitation of MediaWiki. Note that external content is only refreshed when you save the wiki page that contains the <include/>. Changing the external file WILL NOT update the wiki page until the wiki page is edited and saved (not merely refreshed in the browser). You can also instruct the server to refresh the page by adding the refresh action. See w:en:Wikipedia:Bypass_your_cache#Server_cache . You can add the following to a wiki page to make it easier to clear the cache //

This post was posted by Peachey88 (Flood), but signed as Noahspurrier.

Peachey88 (Flood) (talkcontribs)

At the very end of the module, you could add these lines, which disables page caching when it finds "nocache" keyword as in <include ... nocache />. This will disable the cache for pages that use the include tag.

function ef_include_render( $input, $argv, $parser ) {
    if ( !empty( $argv['nocache'] ) ) {

    return $output;

Such an option will be part of a new version of the extension. Another possibility is to install MagicNoCache and to add the magic word to your page, or to install one of the alternatives mentioned on bottom of that page.

This post was posted by Peachey88 (Flood), but signed as Wikinaut.

Reply to "Included file doesnt update (solution: new keyword 'nocache')"