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
0
Question by maraoz · Jan 16, 2013 at 10:39 PM · c#webplayerwebcache

Browser-side WebPlayer application caching.

Hi... I've been trying to solve this for two days now, and I still can't figure it out!

I'm building a WebPlayer application, served inside a really simple web page. The thing is, I can't get the web player file to cache on the browser side. I'm using Amazon S3 to store the built *.unity3d file, and it has all the appropiate caching headers:

 Cache-Control: max-age=2592000, public, must-revalidate

Nevertheless, each time I open the web page, the whole file is transferred, and it takes about a minute to do so. This is time consuming and costly.

What am I missing? I know this can be done because The Hobbit's game does it. The first time I load the web page, 20MB are transferred, but in future requests, only about 30KB are transferred.

If anyone needs to know, this is the uploaded file:
https://s3-sa-east-1.amazonaws.com/combo-combat-release/WebPlayer.unity3d

Thanks for your time and knowledge!
Manuel

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Graham-Dunnett · Jan 17, 2013 at 11:40 AM

 $ curl -I https://s3-sa-east-1.amazonaws.com/combo-combat-release/WebPlayer.unity3d
 HTTP/1.1 200 OK
 x-amz-id-2: xKOLzWwPD1pboYXJVuQbnCdMcng8D75f5WQIRJANmlIXAxX+OmxHyHaeu0GrhzQy
 x-amz-request-id: BE6B915D2EB62ACC
 Date: Thu, 17 Jan 2013 11:28:47 GMT
 Cache-Control: max-age=60, must-revalidate
 Last-Modified: Wed, 16 Jan 2013 23:10:40 GMT
 ETag: "c2d9e81f13d34a281866c787d0d93628"
 Accept-Ranges: bytes
 Content-Type: application/octet-stream
 Content-Length: 5936722
 Server: AmazonS3

So after 60 seconds the file will need to be re-fetched from the server?

Comment
Add comment · Show 1 · 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 maraoz · Jan 17, 2013 at 12:29 PM 0
Share

That was me twiddling with the parameters. From what I understand, though, max-age combined with must-revalide and ETag force the client to ask if the ETag has changed after 60 seconds, not necessarily re-fetch it. Thanks for the answer

avatar image
0

Answer by maraoz · Jan 17, 2013 at 12:32 PM

I haven't been able to solve it yet. Anyway, I think I've got the reason:

I tried the same headers with a smaller (5MB) file, and everything worked. It got cached, the browser sent the If-None-Match, and the server responded with a 304. I think the file exceeds the maximum cacheable size in a browser for a single file.

So, the solution is to use streamed content, or make a Desktop client.
Anyone can confirm this? Is this why streamed content was invented? :P

Comment
Add comment · 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

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

9 People are following this question.

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

Related Questions

Web Build Loading Slow 1 Answer

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

WWW Request runs in Editor but not in Webplayer 1 Answer

Loading data from a different game 1 Answer


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