Is there any reason the web player (or browser, not sure whose responsibility it is) can’t cache a .unityweb file so I don’t have to redownload it every time?
Cheers,
-Jon
Is there any reason the web player (or browser, not sure whose responsibility it is) can’t cache a .unityweb file so I don’t have to redownload it every time?
Cheers,
-Jon
I think this is a setting on the server. I’ve seen several web player files that are being cached by the browser from some servers. So this is probably a setting in apache or which ever webserver being used which forces caching off.
Interesting. It would be great to get details on how that might be changed–my Web host offers no tech support of that kind, but they do run Apache.
I found this block in my apache’s config. ( /etc/httpd/httpd.conf ):
#
# CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each
# document that was negotiated on the basis of content. This asks proxy
# servers not to cache the document. Uncommenting the following line disables
# this behavior, and proxies will be allowed to cache the documents.
#
#CacheNegotiatedDocs
That looks promising. I’m under the “fiddle and pray” form of usage when it comes to web stuff, however.
-Jon
Pardon me for asking, but wouldn’t allowing off site caching be a “bad” thing? Wouldn’t that also allow someone to re-host your game on a different site?
I don’t see a connection. If someone wants to host your game on the other site (and you do nothing to prevent tit), they might just download the .unityweb file and put it anywhere. How is caching related to that?
… well I guess I’m showing my ignorance on this topic. How is a Unity Web Player cached? Is it a copy of the .unityweb file on a local hard drive or temporary files?
Thats up to the web browser. But i guess it is the same way as it caches images.
To the html or plugin the browser will still pretend that the file is coming from the server.
I mean, piracy is not related to caching at all. The .unityweb file is on the server, accessible for the whole internet. So anyone can just directly download it to their computer and do whatever they want with it.
For 1.5.1 we’re adding functions to the web player to check where and how the datafile came from. Then you can properly check whether the datafile was pirated, and display a nice “pirated!” image or something else.
Ahhh… I wasn’t aware of this, although I remember seeing a post related to this a while back. Thanks for clearing this up and sorry for the “diversion”…