Reputation: 103
My app has a JavaScript file that my users load into their website:
<script src="https://s3.amazonaws.com/[my bucket]/app.js"></script>
This URL is always the same, regardless of the user (nothing dynamic).
I've been giving out the URL in that format (s3.amazonaws.com...
).
Now I've decided I want to use CloudFront because the file takes way too long (~.5 seconds) to load. (question 1) Is it too late, now that my users are all including the above script in their page?
Also, (question 2) assuming it is too late and that I need to have all my users update their <script>
tag, is it possible to give out a new CloudFront URL to new users while the old users continue to use this s3...
URL, and both will be accessing the same file (i.e., I don't need to support 2 separate files in Amazon)?
Upvotes: 0
Views: 40
Reputation: 201138
Question 1: Yes it is too late.
Question 2: Yes it is absolutely possible to have CloudFront serving the file while also leaving the file directly accessible on S3.
Upvotes: 2