开发者

Custom CMS written in PHP, should I be sending HTTP content-length header to clients?

开发者 https://www.devze.com 2023-03-29 19:20 出处:网络
I\'ve built a custom content management system on our intranet which allows us to update news articles and content across several sites that I operate. It appears to be working well.

I've built a custom content management system on our intranet which allows us to update news articles and content across several sites that I operate. It appears to be working well.

However the other day I suddenly remembered that I'm not sending the HTTP content-length header when outputting articles on the websites. I send last-modified using the modification date of the article from the database.

Just wondering if I should also calculate the content-leng开发者_JS百科th of the whole page before it's sent to the client? Would it be best practice to send the content-length header or does it have any significant search engine benefits?

Cheers, B


You are required by the standard section 14.13 to send content-length... only exception is when you use "chunked transfer", but for that you have some other requirements...

0

精彩评论

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