【问题标题】:Using gsutil rsync to update contents of a static website served from a Google Bucket使用 gsutil rsync 更新从 Google 存储桶提供的静态网站的内容
【发布时间】:2018-02-22 06:54:30
【问题描述】:

我有一个个人静态网站www.kurtpeek.com,我通过 Google 存储桶提供服务(参见https://cloud.google.com/storage/docs/hosting-static-website)。为了快速使我的本地目录的更新在网站上可见,我想使用gsutil 的rsync 命令。

例如,我对index.html 进行了一些更改,然后运行以下命令:

~/Google Drive/webpage$ gsutil rsync -d . gs://www.kurtpeek.com
Building synchronization state...
Starting synchronization
Copying file://./.DS_Store [Content-Type=application/octet-stream]...
Copying mtime from src to dst for gs://www.kurtpeek.com/CV_Kurt_Peek_September_2017.pdf
Copying mtime from src to dst for gs://www.kurtpeek.com/confirmation.html
Copying file://./index.html [Content-Type=text/html]...
| [2 files][ 19.1 KiB/ 19.1 KiB]                                                
Operation completed over 2 objects/19.1 KiB. 

但是,如果我随后导航到 www.kurtpeek.com 并执行“查看源代码”,我会发现更改并未出现,即使我刷新页面也是如此。

有人可以解释为什么这不起作用吗?

【问题讨论】:

标签: google-cloud-platform rsync gsutil


【解决方案1】:

正如Robert Lacok 所指出的,内容是从缓存中提供的。清除我的历史记录或只是在其他浏览器中查看它会显示更改。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-09-27
    • 1970-01-01
    • 2019-01-25
    • 2019-01-07
    • 2016-12-22
    • 2015-10-01
    • 2021-08-15
    • 1970-01-01
    相关资源
    最近更新 更多