使用Polymer我可以在本地http服务器上托管我的文件,但是当将文件上传到Dropbox的公共目录时,该页面不再呈现。
我在本地服务器和保管箱之间可以看到的唯一主要区别是,保管箱通过https为页面提供服务。
我看不到任何错误出现在控制台中。
<!DOCTYPE html>
<html>
<head>
<script src="bower_components/webcomponentsjs/webcomponents.js"></script>
<script src="keys.js">
</script>
<script src="script.js">
</script>
<link rel="import" href="bower_components/core-elements/core-elements.html">
<link rel="import" href="bower_components/google-map/google-map.html">
<link rel="import" href="key-list.html">
- 剪断 -
答案 0 :(得分:1)
我在控制台中看到错误。绝对是https的问题。
Mixed Content: The page at 'https://dl.dropboxusercontent.com/u/11144544/keys/v2/index.html' was loaded over HTTPS, but requested an insecure stylesheet
'http://fonts.googleapis.com/css?family=Roboto:400,300,500,700|Source+Code+Pro'. This request has been blocked; the content must be served over HTTPS.
尝试将https用于Google字体,或在同一域中托管字体文件。