Comments (6)
Did you encounter this as a problem with s3-index
specifically or did you see that with other resources?
from ember-cli-deploy-s3-index.
I think the only issue was with index.html file. But as the other assets loading is done thanks to index.html file, I can't tell for sure.
from ember-cli-deploy-s3-index.
So you had issues due to the cache header? And these issues were fixed due to cache-control = private, no-store
? What behavior did you encounter that was not what you expected? I have been using the addon on multiple projects and I can't remember I ran into issues - that's why I am asking.
Of course you can always customize this value via the cacheControl-option
from ember-cli-deploy-s3-index.
Yes, I've had some issues with this cache header. The index.html was not refreshed but served from the cache when typing the app's root url in Chrome / Firefox adress bar. Note that there was no issue when typing myapp.com/signin
. Typing an other url than the root one would refresh the index.html.
Setting the cacheControl to private, no-store
fixed the issue. I've opened a PR to update the default cacheControl
. Feel free to accept / close it.
from ember-cli-deploy-s3-index.
So you updated the index-file, activated it and then you didn't see the new version because it was served from the cache?
I have not encountered this and I'm a bit reluctant to change the default as nobody encountered an issue like that so far as far as I can tell. Can you walk me through what you did when you encountered the issue?
I would assume that checking if the version to serve exists in the cache and then serve it would be desired behaviour instead of redownloading it every time no matter what.
Private also isn't really something that everybody needs as you would normally serve the same version to all your users when using s3-index
.
Can you please elaborate some more why you fell the suggested change is better than the existing default?
from ember-cli-deploy-s3-index.
So you updated the index-file, activated it and then you didn't see the new version because it was served from the cache?
I did it again and I have to say I misunderstood the meaning of the 304 HTTP reponse. As long as the new index-file is not activated, I get 304 reponses. When it is activated, I properly get a 200 reponse.
I would assume that checking if the version to serve exists in the cache and then serve it would be desired behaviour instead of redownloading it every time no matter what.
I understand what you say. I have been confused by the 304 response code. I thought the network request had not hit cloudfront to check index-file validity but had served index-file from the cache right away. It turns out I was wrong: the network request first hit cloudfront then serve index-file from the cache. If any new index-file is referenced, I should get a 200 response.
False alarm. Sorry for that and thank you for your answers.
from ember-cli-deploy-s3-index.
Related Issues (20)
- Activate task becomes very slow when you have a lot of deployed items HOT 6
- Upgrade AWS SDK dependency to v3
- Official release of v4 HOT 2
- AWS Credentials should not be required HOT 2
- Latest release does not include AWS s3 improvements HOT 2
- Make `contentType` configurable or auto-detected HOT 1
- NoSuchKey Error HOT 3
- Error: Cannot find module 'lodash' HOT 5
- No such file or directory, open '/index.html' HOT 4
- delete old revisions keeping the most 5-10 recent HOT 9
- Full Changelog link is not working (minor error) HOT 3
- `Without Cloudfront` solution is invalid HOT 7
- Deprecation warning with ember-cli 2.12.0 HOT 2
- add revision key to failure message HOT 1
- The support for `profile` is not released :( HOT 2
- Possible to fail sooner in the process? HOT 3
- Use with Prember HOT 2
- New release HOT 3
- InvalidArgument: null in aws-sdk HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-deploy-s3-index.