Single Page App + Amazon S3 + Amazon CloudFront + Prerender.io - How To Set Up?
- I have single page app built with Backbone.js.
- I host app (app consists of static files only) on Amazon S3.
- I use CloudFront as a Bucket CDN.
- App is accessed by
https://myapp.com -> https://abcdefgh34545.cloudfront.com -> https://myBucket.s3-eu-west-1.amazonaws.com/index.html
How I can use
Prerender.io service with this stack? I have to somehow detect that WebSpider/WebRobot is accessing the page and redirect it to prerender.io...
It's hard to use Prerender.io with a static Amazon S3 site.
You could stand up an nginx/apache server in front of s3:
This solution is less ideal because you lose the closest-location benefit of cloudfront.
This is a good article about a custom solution: http://www.dave.cx/post/23/prerendering-angular-s3/
David was able to generate the static HTML and save them in S3, then use CloudFlare to detect _escaped_fragment_ in the URL and redirect it to the static HTML on S3.
- → React Router + AWS Backend, how to SEO
- → How to improve SEO for Serverless Websites?
- → File Upload to aws S3 Laravel 5.1
- → Uploading to S3 with Laravel 5.2
- → Why october cms don't save attachments on db by upload images with amazon-s3?
- → File size limit for uploads into aws s3 in OctoberCMS Media Library
- → S3 putObject callback not returning expected objects
- → Amazon S3 image hosting with Shopify
- → Can't upload a file to AWS S3 using OctoberCMS
- → AWS S3 cannot delete objects in bucket via PHP SDK
- → Laravel S3 Storage disk; has() is returning false
- → Laravel s3 multiple buckets
- → AWS upload file from client to S3