cloudy cloudy

Author Topic: Help with "Specify a cache validator Help" errorI've been working on optimizing  (Read 332 times)

0 Members and 1 Guest are viewing this topic.

Offline eboettn

  • Posts: 16
  • Marietta, GA
  • OS/Browser:
  • Mac OS X 10.13.6
  • Safari 11.1.2
    • East Cobb Weather
I've been working on optimizing my site to make it load quicker.

On the speed test sites, it always tells me that I need to Specify a cache validator. Which I have, but it lists out all of the images in the ajax-images and the alert-images file that our scripts / templates use. I can't figure out why those images / folders are not "specifying a cache validator" when I've worked hard (I thought) to ensure my site have the last-modified and ETags.

Any suggestions? Thanks!!

Here's part of my .htaccess file that deals with this:


FileETag MTime Size
<IfModule mod_expires.c>
 
  ExpiresActive on
 
# Perhaps better to whitelist expires rules? Perhaps.
  ExpiresDefault                          "access plus 1 week"
 
# cache.appcache needs re-requests in FF 3.6 (HTML5)
  ExpiresByType text/cache-manifest       "access plus 5 minutes"
 
# Your document html
  ExpiresByType text/html               "access plus 5 minutes"
   ExpiresByType text/php      "access plus 5 minutes"
    ExpiresByType text/text       "access plus 5 minutes"
     ExpiresByType text/txt      "access plus 5 minutes"
# Data
  ExpiresByType text/xml                  "access plus 30 minutes"
  ExpiresByType application/xml           "access plus 30 minutes"
  ExpiresByType application/json          "access plus 30 minutes"
 
# RSS feed
  ExpiresByType application/rss+xml        "access plus 30 minutes"
 
# Favicon (cannot be renamed)
  ExpiresByType image/x-icon              "access plus 1 month"
 
# Media: images, video, audio
  ExpiresByType image/gif                 "access plus 5 minute"
  ExpiresByType image/png                 "access plus 5 minute"
  ExpiresByType image/jpg                  "access plus 5 minute"
  ExpiresByType image/jpeg                 "access plus 5 minute"
  ExpiresByType video/ogg                "access plus 60 minute"
  ExpiresByType audio/ogg                  "access plus 60 minute"
  ExpiresByType video/mp4                  "access plus 60 minute"
  ExpiresByType video/webm                 "access plus 60 minute"
   
# HTC files  (css3pie)
  ExpiresByType text/x-component          "access plus 1 month"
   
# Webfonts
  ExpiresByType font/truetype             "access plus 1 year"
  ExpiresByType font/opentype             "access plus 1 year"
  ExpiresByType application/x-font-woff   "access plus 1 year"
  ExpiresByType image/svg+xml             "access plus 1 year"
  ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
     
# CSS and JavaScript
  ExpiresByType text/css        "access plus 1 month"
  ExpiresByType application/javascript     "access plus 1 month"
  ExpiresByType text/javascript            "access plus 1 month"
  ExpiresByType application/x-javascript  "access plus 1 month"

  </IfModule>
 
 
 
  <IfModule mod_headers.c>
  Header set Connection keep-alive
    <FilesMatch "\\.(ico|css|js|sfw)$">
        Header set Cache-Control "max-age=13145000, pubic, must-revalidate"
        Header set Last-Modified "Mon, 31 Aug 2009 00:00:00 GMT"
    </FilesMatch>
    <FilesMatch "\\.(gif)$">
        Header set Cache-Control "max-age=300, pubic, must-revalidate"
        Header set Last-Modified "Mon, 31 Aug 2009 00:00:00 GMT"
    </FilesMatch>
    <FilesMatch "\\.(jpe?g|png|)$">
        Header set Cache-Control "max-age=300, pubic, must-revalidate"
        Header set Last-Modified "Mon, 31 Aug 2009 00:00:00 GMT"
    </FilesMatch>
    <FilesMatch "\\.(x?html?|php)$">
        Header set Cache-Control "max-age=60, pubic, must-revalidate"
        Header set Last-Modified "Mon, 31 Aug 2009 00:00:00 GMT"
    </FilesMatch>

</IfModule>
Eric
Marietta, GA
East Cobb Weather
http://www.ericboettner.com/weather/index.php


Offline z96Cobra

  • Posts: 4
  • OS/Browser:
  • Android 8.0.0
  • Chrome 68.0.3440.91
I'm unable to help with your issue (I'm still learning the basics),  but wanted to ask if I could copy/borrow/steal your tropical summary page?  I tried to use your "contact us" page, but it is currently down. 

Thanks,
Roger
www.rkb2.com

Offline eboettn

  • Posts: 16
  • Marietta, GA
  • OS/Browser:
  • Mac OS X 10.13.6
  • Safari 11.1.2
    • East Cobb Weather
z96Cobra - thanks for letting me know about the contact us page. not sure what happened there but I'll work on fixing it.

I'll send you a PM with the tropical summary page. I don't mind sharing at all!

- Eric
Eric
Marietta, GA
East Cobb Weather
http://www.ericboettner.com/weather/index.php


Offline eboettn

  • Posts: 16
  • Marietta, GA
  • OS/Browser:
  • Mac OS X 10.13.6
  • Safari 11.1.2
    • East Cobb Weather
In case this helps, here's what I'm talking about.



The following resources are missing a cache validator. Resources that do not specify a cache validator cannot be refreshed efficiently. Specify a Last-Modified or ETag header to enable cache validation for the following resources:
http://banners.wunderground.com/cgi-bin/banner/ ... atherStationCount&weatherstationcount=KGAMARIE64
https://api.aerisapi.com/oauth2/permissions?cli ... _secret=lXcMtu3rO6271AqeXxCSmQnFA2Q066aDdkIIrEA2
https://api.aerisapi.com/threats/33.995283,-84. ... _secret=lXcMtu3rO6271AqeXxCSmQnFA2Q066aDdkIIrEA2
https://www.ericboettner.com/weather/DualImage.php?i=hi_tsra&ip=20&j=hi_tsra&jp=40
https://www.ericboettner.com/weather/DualImage.php?i=nscttsra&ip=70&j=nscttsra&jp=20
https://www.ericboettner.com/weather/ajax-images//aqi_good_text.gif
https://www.ericboettner.com/weather/ajax-images/FWIFire0.gif
https://www.ericboettner.com/weather/ajax-images/UV10.gif
https://www.ericboettner.com/weather/ajax-images/UV11.gif
https://www.ericboettner.com/weather/ajax-images/UV9.gif
https://www.ericboettner.com/weather/ajax-images/W.gif
https://www.ericboettner.com/weather/ajax-images/falling.gif
https://www.ericboettner.com/weather/ajax-images/flyout-sub.gif
https://www.ericboettner.com/weather/ajax-images/flyout-transparent.gif
https://www.ericboettner.com/weather/ajax-images/moon/w/NH-moon00.gif
https://www.ericboettner.com/weather/ajax-images/moon/w/NH-moon26.gif
https://www.ericboettner.com/weather/ajax-images/raindrop.jpg
https://www.ericboettner.com/weather/ajax-images/rising.gif
https://www.ericboettner.com/weather/ajax-images/sct.gif
https://www.ericboettner.com/weather/ajax-images/spacer.gif
https://www.ericboettner.com/weather/ajax-images/wr-SW.png
https://www.ericboettner.com/weather/ajax-images/wr-W.png
https://www.ericboettner.com/weather/ajaxWDwx3.js
https://www.ericboettner.com/weather/ajaxgizmo.js
https://www.ericboettner.com/weather/alert-images/A-none.png
https://www.ericboettner.com/weather/forecast/images/nbknfg.jpg
https://www.ericboettner.com/weather/forecast/images/ntsra10.jpg
https://www.ericboettner.com/weather/forecast/images/ntsra50.jpg
https://www.ericboettner.com/weather/forecast/images/ra10.jpg
https://www.ericboettner.com/weather/forecast/images/sctfg.jpg
https://www.ericboettner.com/weather/images/nohazards.png
https://www.ericboettner.com/weather/raintoday.gif
https://www.ericboettner.com/weather/weather-screen-css2018-narrow.css
https://www.ericboettner.com/weather/webcamsmall.jpg
https://www.googletagmanager.com/gtag/js?id=UA-101597709-1
Eric
Marietta, GA
East Cobb Weather
http://www.ericboettner.com/weather/index.php


Offline niko

  • syzygy
  • Global Moderator
  • Posts: 27,519
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 68.0.3440.106
What about the error pointed out by Ken on your duplicate posting on wxf? Did fixing that help?

Offline eboettn

  • Posts: 16
  • Marietta, GA
  • OS/Browser:
  • Mac OS X 10.13.6
  • Safari 11.1.2
    • East Cobb Weather
Hey Niko - no it didn't help. While my error was a stupid typo, it still give me the same issue when running tests.
Eric
Marietta, GA
East Cobb Weather
http://www.ericboettner.com/weather/index.php


Offline niko

  • syzygy
  • Global Moderator
  • Posts: 27,519
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 68.0.3440.106
That's unfortunate  :(

Offline eboettn

  • Posts: 16
  • Marietta, GA
  • OS/Browser:
  • Mac OS X 10.13.6
  • Safari 11.1.2
    • East Cobb Weather
Eric
Marietta, GA
East Cobb Weather
http://www.ericboettner.com/weather/index.php


Offline z96Cobra

  • Posts: 4
  • OS/Browser:
  • Android 8.0.0
  • Chrome 59.0.3071.125
z96Cobra - thanks for letting me know about the contact us page. not sure what happened there but I'll work on fixing it.

I'll send you a PM with the tropical summary page. I don't mind sharing at all!

- Eric

Thanks! I really like the layout you have!