Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Bill-Robinson · Sep 21, 2012 at 02:01 PM · webplayerplugincachehttpcaching

Caching of .unity3d file?

I have noticed when the .unity3d file is downloaded from our web page, it has the request headers

 Cache-Control: no-cache
 Pragma: no-cache

which is causing cache misses where they would potentially hit (and running up a large bill with our CDN).

Is there a way to make the Unity web player support caching when downloading this .unity3d file? For example as an option to the unityObject.embedUnity call?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Graham-Dunnett · Jan 16, 2013 at 03:47 PM

In a web browser all requests for data are handled by the web browser. So your unity3d file is fetched for the web player using the browser. You can see this in browsers that have some kind of activity or network viewer. If you want the unity3d file to be cached by the browser, set it's headers accordingly. The unity3d files fetched from the unity3d.com site have:

 Cache-Control:max-age=604800

Maybe whoever set your site up has turned caching off for a reason?

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bill-Robinson · Jan 17, 2013 at 08:52 AM 0
Share

Sorry, maybe I should have said, those are the request headers sent. The content is delivered via a CDN. We use unique URLs (with no query string) for each new version.

As the request headers specify no-cache, the server should always send the full file. The question is really why this is happening. The file is about 10$$anonymous$$B.

avatar image Bill-Robinson · Jan 17, 2013 at 09:12 AM 0
Share

So, after looking at my Chrome settings and re-enabling the cache when the Developers Tools window is open, I now see as a header sent Cache-Control: max-age=0 and no Pragma header. I suppose that is an improvement, but it still inhibits caching.

Actually now I cannot find a reference to the web browser unityObject interface, it redirects to UnityObject2.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Does WWW has cache? Any official member can give us a result? 0 Answers

Web player caching is not happening in only Safari browser. 0 Answers

Web player cache 1 Answer

Does anyone have figures which show the take-up ratio for new users hitting unity webplayers for the first time? 2 Answers

Turn off / invalidate browser cache 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges