We use static web hosting for our ReactJS website. We either deploy it on S3 if its AWS or Blob Storage if it’s Azure
To further improve the load time of the website, we put a CDN in front of it - AWS CloudFront or Azure CDN.
Irrespective of the cloud, the following settings are configured
Browser Cache Settings
cache-control
to no-store
the necessary header tags on the file.cache-control
to no-store
the necessary header tags on the file.CDN Cache Settings
For each non-prod environment, we will have a dedicated hosting with a user-friendly URL format. The URL format is of the env will be https://<app-name>-<env-name>.cawstudios.com
Env Name | Branch name | URL |
---|---|---|
Develop | develop | https://<app-name>-develop.cawstudios.com |
QA | qa | https://<app-name>-qa.cawstudios.com |
Staging | staging | https://<app-name>-staging.cawstudios.com |
Production | master | The actual application domain |
Note - The website will always be available on https
. The http
should auto-redirect to https and user should never be able to access the website on http
.