服务器端包含在S3上 [英] Server Side Include on S3

查看:177
本文介绍了服务器端包含在S3上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亚马逊S3具有静态的网站托管,但不支持标签,如:

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" -->

反正是有模仿这种功能,而不必某种的JavaScript / AJAX内容请求的头在每一页上的S3?

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

推荐答案

您可以使用JavaScript来组装页面在客户端浏览器。随着jQuery的:

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

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

这有一个像谷歌搜索引擎优化的严重drawback--搜索引擎将无法看到最后一页。

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

您也可以嵌入在网页中的内容作为一个iframe。

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

这篇关于服务器端包含在S3上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆