Etag not being added to a large web page

Posted on 2010-01-04
Last Modified: 2012-05-08
I have a large text web page (458K uncompressed) that Apache2.2 should be adding an ETag to however it's not.  All other pages on the site are being given an ETag but not this one.  What do I need to do to fix this?

---== Apache config ===--
FileETag All
ExpiresActive On
ExpiresDefault "access plus 180 days"

Note: Most other pages also have the "Content-Length" header set but Apache seems to be excluding it for this page (which according to the HTTP spec is ok).
---=== Current Request & Response headers ===---

GET /tools/port-scan/port-number-assignments.shtml HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.x 200 OK
Date: Mon, 04 Jan 2010 19:40:57 GMT
Server: Apache
Accept-Ranges: bytes
Cache-Control: max-age=15552000
Expires: Sat, 03 Jul 2010 19:40:57 GMT
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Keep-Alive: timeout=3, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html

Open in new window

Question by:Geoff Millikan

    Author Comment

    by:Geoff Millikan
    Seems I've stumped all the experts!  :-)

    Ok, I'll help you out a bit: I discovered that the ETag isn't being set on any files that have INCLUDES in them like this web page called "test.shtml" isn't being given an ETag.  I've searched and searched and there's no reason that having INCLUDE's should screw up Apache's core FileETag directive!!

    ---== test.shtml ==---
    <!--#include virtual="/ssi/footer-master.shtml" -->

    ---== Apache httpd.config ==---
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml

    ---== Background ==---

    LVL 26

    Accepted Solution


    Author Comment

    by:Geoff Millikan
    No, didn't see that, I hope it's not true because there really needs to be some way of getting an ETag on dynamic content.

    Seems like all content would want to be ETag'ed - especially dynamic content since it's the most expensive to serve and usually the largest to deliver. I've been reading though the Apache user group and there's a lot of people that want to add ETag to dynamically generated pages.

    I'm so surprised that the Apache documentation doesn't indicate any such ETag limitations and it appears as though it's not supported.

    Enough ranting.

    Author Comment

    by:Geoff Millikan
    FYI - Apache docs have been updated as a result of this thread, "Server Side Includes: An ETag is not generated for responses parsed by mod_include, since the response entity can change without a change of the INode, MTime, or Size of the static file with embedded SSI directives."

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
    If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now