Grade F on Add Expire Headers

I used the YSlow Firefox add-on and returned the following result:

Grade F on Addition of Expiration Headers

There are 8 static components with no expiration date.

* (no expires) http://localhost:63808/WebSite/css/Global.css?...
* (no expires) http://localhost:63808/WebSite/css/BemVindo.css?...
* (no expires) http://localhost:63808/WebSite/js/Global.js?...
* (no expires) http://localhost:63808/WebSite/js/BemVindo.js?...
* (no expires) http://www.maplist.com.br/img/faixa_verde.png
* (no expires) http://www.maplist.com.br/img/logo_home.png
* (no expires) http://www.maplist.com.br/img/wait_bar.gif
* (2010/1/23) http://localhost:63808/WebSite/favicon.ico

I solve the problem using the HttpHandler component:

www.codeproject.com/KB/aspnet/CssAndJavaScriptOptimizer.aspx

Is there an easier way to solve the problem? Maybe in global.asax?

By the way, I use this meta on my page:

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="PUBLIC"> 
<META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 22 Jul 2010 11:12:01 GMT">
+3
source share
3 answers

You must change the title of Expires:these pages so that they can expire in the distant future, allowing users browsers to cache them.

mod_expires apache this . , , IIS.

+3

HTTP- - PHP/ , nginx, ftp ( backend-engine)

+2

IIS allows you to automatically set the Expires header to all static content. This is the method that I usually use.

0
source

Source: https://habr.com/ru/post/1729632/


All Articles