- Home /
Webplayer unity3d file cache
Hi,
I am building a webplayer game. When I upload a new version of the .unity3d file this new version is not used but the old one is displayed.
I don't know what is the problem, maybe a cache problem, and how to solve it.
Thanks a lot !
I know that if I clean the cache I get the new version but is there an automatic way of doing this fur the user. I mean if it's the new version don't use the cached one.
Answer by Kryptos · Oct 19, 2012 at 01:51 PM
You have to make an apache directive (.htaccess or httpd.conf files) for the file type .unity3d so that it should always be revalidated. Something like:
Header unset Pragma
FileETag None
Header unset ETag
# cache file for 2 hours (7200s)
<FilesMatch "\.unity3d$">
Header set Cache-Control "max-age=7200, public, must-revalidate"
Header unset Last-Modified
</FilesMatch>
See: http://www.askapache.com/htaccess/apache-speed-cache-control.html
Thanks a lot I will look for that, can I do that on the html webplayer page meta ? like this ?
meta http-equiv="cache-control" content="no-cache, must-revalidate"
$$anonymous$$aybe I don't know. It is better to do it on the server side.
Answer by lil_billy · Oct 19, 2012 at 01:36 PM
hmmmm have you tried deleting the old build before building a new one