On Thu, Jul 22, 2010 at 8:23 PM, Neil Kandalgaonkar neilk@wikimedia.org wrote:
I meant cached in the same way that skins are cached. Not cached in the sense of having a completely static page.
What do you mean when you talk about skins being cached?
On Fri, Jul 23, 2010 at 8:00 AM, Platonides Platonides@gmail.com wrote:
You would need to reparse on edit (which changes categories) all pages including the image. Even if the image comes from commons or another ForeignRepo. Not as easy, I think, but this is a long wanted proposal, see bug 8298/9616.
Ouch. You're right, I hadn't thought of that. The categories for each image can't be stored in the parsed text, that will mean updates don't propagate until the next reparse.
Okay, so how about this instead: when generating the page, the server retrieves all categories for all images on the page, then checks against site and user preferences to see if any need to be censored, and if so, stick a list into the <head>. That should work fine -- it should be okay to retrieve the categories (local and foreign) for each image on the page on every page load, right? However, the image loading would have to be revised somehow, to not delay the loading of uncensored images . . . as usual, IE is the problem here. Aside from older IE versions, we could use attribute selectors, img[src=http://......], assuming we can get the src easily on the server side for each image.