开发者

When I use javascript:alert(document.lastModified) alert appears, but no information enclosed

开发者 https://www.devze.com 2023-04-04 13:29 出处:网络
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. M

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().

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号