4

Amazon S3 has static website hosting, but does not support tags like:

<!--#include virtual="i/header.htm" -->
<!--#echo var="i/header.htm" -->
<!--#include file="i/header.htm" -->

Is there anyway to mimic this functionality without having some sort of JavaScript/AJAX content request for the header on every page on S3?

dgxshiny
  • 107
  • 1
  • 6

2 Answers2

2

You could use javascript to assemble the page in the client browser. With jQuery:

$('#header').load('header.html');

This has a serious SEO drawback-- search engines like Google won't see the final page.

You could also embed content in the page as an iframe.

Acyra
  • 15,864
  • 15
  • 46
  • 53
1

Amazon S3 provides flat file storage. Whatever logic you apply needs to be client-side.

Skyler Johnson
  • 3,833
  • 1
  • 20
  • 6