How to turn off Etag with htaccess?

后端 未结 2 1605
南笙
南笙 2021-01-04 09:13

One of my friend says, etags on off mode for speed up page loading. How to off etags with htaccess?

相关标签:
2条回答
  • 2021-01-04 09:31

    Putting the following in your .htaccess should do the trick.

    Header unset ETag
    FileETag None
    

    Note: Disabling etags only helps if you are hosting the same content from more than 1 server (such as when using a cluster or CDN). Take a look at wikipedia or yahoo best practices for more information.

    0 讨论(0)
  • 2021-01-04 09:42

    To unset Etags use 3 lines below:

    Header unset Pragma
    FileETag None
    Header unset ETag 
    

    But, to increase page loading speed, my advice is YSlow. perfect tool & Yslow recommends to use Etags instead of setting off.

    0 讨论(0)
提交回复
热议问题