Wikia – Caching Frustrations

As I’ve been investigating existing web solutions I would like to highlight something I encountered on my work for the Dark Age of Camelot Wiki and the Wrath of Heroes Wiki.

Wikia allows you to create your own Wiki’s and BioWare Mythic have been using this to create pages for their games. I have only been using Wikia for about a month and it is certainly a learning experience for me, they have a very good scalable system that performs well, but the amount of caching makes it quite difficult to do complex tasks.

The task

Implement a JavaScript timer system to count down.

First Attempt

Okay, we can’t use in-line JS, so we have to use the MediaWiki:Common.js file, and we have to hook onto a load event to start everything off, that’s fine.

Hey great, it works, let me just tweak a .js value. Oh wait, that didn’t change anything.

Congratulations, you’ve just hit caching!

Wikia has multiple levels of caching, for a page, for a user and for the browser. And no matter how many times I edited the file, cleared the cache, purged the page, I couldn’t get some silly javascript to update to the latest code.

Wikia did reply to my support request saying they were aware of some issues regarding inclusion of JavaScript and CSS in a timely manner. However it became unusable and so I scrapped the idea, and went for a simpler solution.

Second Attempt

I knew from the Facebook like box that I could include iframes to different websites, and decided I would do the main timer work on my own website and include on the wiki with an iframe. To do this:

  • Create a page which will store the HTML code, e.g. MediaWiki:somepagename
  • Add the following code to the page you want to add the iframe to: <verbatim>somepagename</verbatim>

Great I thought, things are looking perfect, let me just tweak the height of that iframe.

Congratulations, you’ve just hit caching!

There was no change to my code. So I had to devise a way where I could force the page to notice there was an update needed, and this may not be the best way to do this but my steps are as follows:

  • Change the height in the iframe wikia page
  • Rename the iframe wikia page
  • Change the link in the wikia page which displays the iframe.


Would I try and do complicated things on Wikia again? No. Do the complicated stuff on another site, then include them if at all.

Granted there are benefits of using an existing system on the net instead of writing your own, which is also a good point to make.