Mobile app version of vmapp.org
Login or Join
Phylliss660

: Set Expires: -1 HTTP Header by mistake and visitors dropped? I was trying to do some SEO improvements on my website and accidentally set the Expires header to -1. I changed it back after a

@Phylliss660

Posted in: #AspNet #Headers #Html

I was trying to do some SEO improvements on my website and accidentally set the Expires header to -1.

I changed it back after a couple of days.

Would the Expires: -1 header be the cause of why my number of visitors has dropped from a daily average of about 3800 to 1300, quite a drastic cut. What's a best value to put for Expires or should I leave that well alone? I've noticed a competitor does a month and so did the same now.

Will Google revisit my Expires: -1 pages eventually or will they be forever be ignored by Googlebot? I guess that might be a guess.

HTTP/1.1 200 OK
Cache-Control: no-cache, max-age=0, no-cache, no-store, must-revalidate
Content-Encoding: gzip
Content-Type: text/html
Date: Thu, 21 Apr 2016 18:02:06 GMT
Expires: -1


The following resulted in the Expires header being set:

Response.Cache.SetCacheability(HttpCacheability.NoCache);


I also updated all the images, made them smaller in size by compressing them using ImageMagick so that they got a good "rating" with webpagetest.org. Would that have also caused a significant drop.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Phylliss660

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shelton105

Would the Expires:-1 be the cause of why my number of visitors has dropped from average of about 3800 to 1300


No.

The Expires header simply controls caching. A value of -1 (strictly an invalid value, which should really be in HTTP-date format) will simply be seen as "expired". So, users will always make server requests.

Note that the Cache-Control: max-age header is also set. This actually takes priority over the Expires header in compliant browsers (every browser in the last few years and then some).

In fact, with caching disabled, you are likely to see an "increase" in visitors (or at least "hits"), not less! (If you see any change at all.) You will see more "hits" because your server will be receiving more requests.


Whats a best value to put for expired


What you set for your cache headers is entirely dependent on your content and how often it changes. If it rarely changes then set a long(er) cache time. If it changes very often then set a short time or even disable caching (like you did).


Would google revisit my expires:-1 pages eventually


Yes. If anything, an Expires: -1 header might encourage Google to crawl more often.

Nothing that you've stated in your question would necessarily result in a traffic drop. It's something else.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme