: Etags are not appearing on PHP pages My hosting provider (goDaddy) seems to be adding eTags to my files. However I've noticed that they are not appearing on .PHP file (they are on .HTM, .CSS,
My hosting provider (goDaddy) seems to be adding eTags to my files.
However I've noticed that they are not appearing on .PHP file (they are on .HTM, .CSS, .JS and images). Is this normal?
From my reading up on etags there doesnt seem to be much you can do to configure them. Or is there something I can add to .htaccess to get etags on all files?
More posts by @Kevin317
1 Comments
Sorted by latest first Latest Oldest Best
This is normal for dynamic pages. An ETag is a unique identifier for that version of a particular file. The web server can automatically set ETags for static files (html, css etc.), because it can work out when their contents were last changed by looking at the file's last modified time (and some other attributes). There's no way for the web server to know when the HTML generated by your PHP scripts last changed because it is generated on the fly.
You can manually set an ETag from within the PHP script using PHP's header function, but you should only do that if you have a way to generate a unique identifier that will change when the content changes. Generally dynamic pages don't set ETags.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.