NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

#1 06-17-2007 16:39:02

Lark
New member

Prevent caching with .htaccess

I'm sure people have had this problem a lot. You retouch an image and then when you go to retouch it again, your changes have mysteriously disappeared. Generally this is because your browser likes to cache everything it can... and clearing your cache is usually the only way to fix this.

Another thing you can do is prevent your oekaki files from caching altogether. Just add these lines to your oekaki .htaccess file:

Code:

<FilesMatch "\.(php|png|pch|spch|oeb)$">
Header set Cache-Control "max-age=0, no-cache, no-store, private"
Header set Pragma "no-cache"
Header set Expires "0"
</FilesMatch>

Last edited by Lark (06-17-2007 16:39:30)

Offline

#2 06-17-2007 22:18:34

Waccoon
Administrator

Re: Prevent caching with .htaccess

Hmm... disabling caching on PNG images isn't a good idea.  wink  Doing that for the animations would be fine.

It would take a bit of testing to find out how large a value would be appropriate for max-age.  Too small, and people browsing the board would be downloading everything multiple times.  Too large, and there would be no point to doing it manually.  You'd have to find out the average time that people spend browsing the board.

Offline

#3 06-17-2007 22:39:05

Lark
New member

Re: Prevent caching with .htaccess

Yes, that's the part that I haven't really tested out yet. smile I don't have a really active board yet, so I haven't been able to get a good value estimate.

Offline

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB