What is expire header and how to achive them in ASP.NET and PHP? -


I have examined the performance statistics of my website today. I have received a warning (or error may occur) that is given below

  Add Terminal Headers Here are 15 static components without a 15-futures end date * (no end) Http://www.example.com/video/css/global.css * (no time limit) http://www.example.com/video/js/global.js * (no expiration ) Http: //www.example.com/video/images/main-bg.png  

what it means and how to achieve it both in PHP and ASP.Net. I am on a shared hosting server, so please tell me some ways to use the code, because I can not make any modifications at the end of the server.

If I expire the header, then there is no chance that if I make changes to the CSS, then the user will not be able to remove them immediately because CSS and other files have a fixed time limit (1 month, week ) Are cached for. Is

Is there any harm to using PHP?

  $ time = time () + 3 * 24 * 60 * 60; // 3 day headings ('End:'. GMDAT ('D, D MYH: i: s \ g \ m \ t', $ time);  

I suggest Apache module mod_expires [1]. You can put something in an .htaccess file

   "<. (Jpg | gif | Png | css | js] $ "& gt; expiresDefault implementation" Access plus 3 days "  

This will match all images, css and javascript files And a will headers for 3 days

[1]


Comments

Popular posts from this blog

c++ - Linux and clipboard -

sql server - How can I determine which of my SQL 2005 statistics are unused? -