Comments (2)
I can't seem to replicate your issue. I've setup the example from scratch at d29duxwrhdfzyt.cloudfront.net (which is live right now). My tests show the
correct result with the browser getting the non-prerendered version (see below).
Do you have any example I can see?
I admit it's not easy to see which is the pre-rendered version and which not from
the raw HTML. You have to search for "loading..." I'll change the SPA to make it
more obvious.
$ curl -H 'User-Agent: Facebot' https://d29duxwrhdfzyt.cloudfront.net/over/here
<!DOCTYPE html><html><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Simplest Single Page Application (SPA) Ever</title>
<style type="text/css">
/* CSS with thanks http://bettermotherfuckingwebsite.com */
body{
margin: 40px auto;
max-width: 650px;
line-height: 1.6;
font-size: 18px;
color: #444;
padding:0 10px
}
h1,h2,h3{
line-height:1.2
}
</style>
</head>
<body>
<h1>Simplest Single Page Application (SPA) Ever</h1>
<div id="content"><p>Welcome to the /over/here page.</p><p></p><ul><li><a href="/">/</a></li><li><a href="/index.html">/index.html</a></li><li><a href="/somewhere">/somewhere</a></li><li><a href="/anywhere">/anywhere</a></li><li><a href="/over/here">/over/here</a></li><li><a href="/over/there">/over/there</a></li></ul></div>
</body></html>%
$ curl https://d29duxwrhdfzyt.cloudfront.net/over/here
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Simplest Single Page Application (SPA) Ever</title>
<style type="text/css">
/* CSS with thanks http://bettermotherfuckingwebsite.com */
body{
margin: 40px auto;
max-width: 650px;
line-height: 1.6;
font-size: 18px;
color: #444;
padding:0 10px
}
h1,h2,h3{
line-height:1.2
}
</style>
<script src="/code.js" async></script>
</head>
<body>
<h1>Simplest Single Page Application (SPA) Ever</h1>
<div id="content">loading...</div>
</body>
</html>
from prerender-cloudfront.
closing this as it works for me. If you have a counterexample, please provide it and re-open.
thanks
from prerender-cloudfront.
Related Issues (19)
- Rework example to remove origin and serve simple SPA from S3 bucket
- Avoid cloudfront caching on pre render request HOT 6
- Lambda Node.js runtime doesn't support v6.10 anymore HOT 4
- Redirection lambda function regex missing .map, .json and whatsapp HOT 3
- Passing querystring to Prerender HOT 2
- CloudFront respects Cache-Control HOT 4
- serve prerendered pages to clients as well as crawlers HOT 3
- Does this work with AWS Amplify? HOT 4
- Don't cache responses from prerender.io
- The Lambda function associated with the CloudFront distribution is invalid or doesn't have the required permissions HOT 5
- nodejs10.x no longer supported in AWS
- This solution will not work with Amplify for Next.js using SSR
- Installation on existing S3 CloudFront CI/CD HOT 11
- Hello, Is it possible to use this cloudfront configuration for customly hosted (on EC2) Prerender source code?
- Some users are getting error pages HOT 1
- Add support for Googlebot, Bingbot, and Yandex HOT 4
- Images and css not loading for bots HOT 1
- Prerender.io cached version has removed the script tag from html HOT 1
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 prerender-cloudfront.