Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Google page speed rank demands me to set an expiry date or a maximum age in the HTTP headers, by changing the "Expires" and "Cache-Control: max-age".

The site is hosted on a hosting company (not in my garage) on a windows platform. I tried by uploading a .htaccess file but they have IISPassword program that blocks it.

The question is how do I modify the HTTP headers?


 
when checking the current header this is what I get:
HTTP/1.1 304 Not Modified
Content-Location: http://pcgroup.co.il/Default.htm
Last-Modified: Wed, 14 Mar 2012 18:38:56 GMT
Accept-Ranges: bytes
Vary: Accept-Encoding
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Wed, 14 Mar 2012 19:16:43 GMT
share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

step 1. Creat a file called web.config.txt upload it to ur server root and then rename it by removing the .txt part you now have the file. you need to then modify the file with the correct code.

share|improve this answer
    
Actually this answer helped realize that I can use the info that @toomanyairmiles wrote without having access to the server settings, only by editing the web.config. Thank you both! –  BornToCode Jun 3 '12 at 21:20
    
an example to the web.config: <system.webServer><httpProtocol> <customHeaders> <add name="Content-Type" value="; charset=utf-8"/> <add name="Expires" value="Mon, 1 Apr 2013 15:30:00 UTC"/> </customHeaders> </httpProtocol> </system.webServer> –  BornToCode Jan 4 '13 at 4:18
add comment

A .htaccess file works only on the Apache webserver, you're using Microsoft's IIS Webserver.

See 'Add Expires or Cache Control Header to static content in IIS'

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.