When I use the following, javascript:alert(document.lastModified),开发者_如何学C in Chrome to check whether my site was updated, the alert dialog box appears, but there is no content within the box. My page is powered by PHP, therefore it should display the time and date of page request should it not?
PHP-generated pages don't have last-modified dates. They're dynamically generated, so by definition their last-modified data is "now", regardless of how much dynamic data is actually served, or if the output hasn't changed since the last time. You'd have to set a last-modified header yourself, using header()
.
精彩评论