1
votes

I have made a html file, but when I upload and test it, I notice that It has 0 "Leverage browser caching". I google-ed a few time how to fix it and found that misses something in browsers request. There writes then I need to add something like this

HTTP/1.1 200 OK

Date: Fri, 30 Oct 1998 13:19:41 GMT

Server: Apache/1.3.3 (Unix)

Cache-Control: max-age=3600, must-revalidate

Expires: Fri, 30 Oct 1998 14:19:41 GMT

Last-Modified: Mon, 29 Jun 1998 02:28:12 GMT

ETag: "3e86-410-3596fbbc"

Content-Length: 1040

Content-Type: text/html

Main question is: I don't know where to add it ?

1
This is something that your web server has to set. So without knowing your server technology it's hard to tell you what to do.Klaus Byskov Pedersen
So, there is nothing I can do? Web hosting did all the work.AMD

1 Answers

2
votes

I think you have a number of problems here: the Apache module to do what you want is mod_expire, so it needs to be installed in the server you use. Its documentation can be found here. However, that version of Apache is beyond old. Also, the server seems to think it's running in 1998, which means you'll have serious trouble to get Expires working as it should.

My advice? Get a new hosting company, one that knows what they're doing, and provides well maintained up to date servers.

mod_expire will be installed by the people that make available the hosting package (in most cases you're not allowed to install Apache modules yourself), how to configure it is explained in many places, this article and this article looks like a nice starting point - and it only uses the .htaccess files, which are available on all hosting setups I'm aware of.