Giter VIP home page Giter VIP logo

Comments (2)

jinty avatar jinty commented on June 22, 2024

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.

jinty avatar jinty commented on June 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.