Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Aug 2010
    Location
    Israel
    Posts
    285
    Plugin Contributions
    0

    Default Re: how to use Specify a cache validator the bmz_cache iamges and js,css in template

    I just saw now that the original .htaccess inside "includes" directory allready has the ExpiresByType
    so only need to change the time you could accept for cache of your css / js files.
    A3600 means 3600 seconds which is 1 hour.
    The CSS file expiration is not suggested to be 1 month as sample above and depends when you
    change it but making it too long could damage your site so be careful...
    I put my css to be 1 week.

  2. #12
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    231
    Plugin Contributions
    0

    Default Re: how to use Specify a cache validator the bmz_cache iamges and js,css in template

    Thank you, but I don't have with problem of the css / js files expiry. only the first 4 files in my post had file expiry issues, the 2nd list had issues with not having a cookie-free domain... which as I mentioned other here seemed to have solved, without hosting the pictures on another domain.

    The warning for those 4 files is:
    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:
    Adding that code in the .htacess of the same folder does not fix it.
    Last edited by ttfan; 6 Jun 2018 at 11:55 AM.

  3. #13
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    231
    Plugin Contributions
    0

    Default Re: how to use Specify a cache validator the bmz_cache iamges and js,css in template

    This is the warning I seem to be unable to fix:

    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:
    https://tabletennisshop.com.au/inclu...ages/logo3.jpg
    https://tabletennisshop.com.au/inclu...-ttsa-logo.png
    https://tabletennisshop.com.au/inclu...es/stars_4.png
    They are in the /includes/templates/responsive_sheffield_blue/images folder.
    Last edited by ttfan; 10 Jun 2018 at 11:20 AM.

  4. #14
    Join Date
    Aug 2010
    Location
    Israel
    Posts
    285
    Plugin Contributions
    0

    Default Re: how to use Specify a cache validator the bmz_cache iamges and js,css in template

    Quote Originally Posted by ttfan View Post
    This is the warning I seem to be unable to fix:


    They are in the /includes/templates/responsive_sheffield_blue/images folder.
    Sounds strange...
    My template images which are located at the same folder as yours, are not showing this warning message.
    I have htaccess file in /includes folder. No htaccess under that directory.
    Check if you have the same.

  5. #15
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    231
    Plugin Contributions
    0

    Default Re: how to use Specify a cache validator the bmz_cache iamges and js,css in template

    I have this .htacess file in the /include folder:
    #
    # @copyright Copyright 2003-2016 Zen Cart Development Team
    # @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    # @version $Id: Author: DrByte Tue Oct 13 14:49:06 2015 -0400 Modified in v1.5.5 $
    #
    # This is used with Apache WebServers
    #
    # The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions
    # It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.
    # Will also prevent people from seeing what is in the dir. and any sub-directories
    #
    # For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.
    # Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified.
    # Example:
    #<Directory "/usr/local/apache/htdocs">
    # AllowOverride Limit Options Indexes
    #</Directory>
    ###############################

    # deny *everything*
    <FilesMatch ".*">
    Order Allow,Deny
    Deny from all
    </FilesMatch>

    # but now allow just *certain* necessary files:
    <FilesMatch "(?i).*\.(js|css|html?|ico|jpe?g|gif|webp|png|swf|flv|xml|xsl|otf|ttf|woff|eot|s vg|map)$">
    Order Allow,Deny
    Allow from all
    </FilesMatch>

    IndexIgnore */*

    <limit POST PUT>
    order deny,allow
    deny from All
    </limit>


    ## NOTE: If you want even greater security to prevent hackers from running scripts in this folder, uncomment the following line (if your hosting company will allow you to use OPTIONS):
    # OPTIONS -Indexes -ExecCGI



    ##################
    ## Optional caching improvements
    ## Requires mod_header and mod_deflate to be enabled within Apache
    ##################
    <IfModule mod_headers.c>
    Header unset Pragma
    FileETag None
    Header unset ETag
    #Header set Cache-Control "no-transform"
    <FilesMatch "(?i).*\.(ico|jpe?g|gif|webp|png|otf|swf|flv|ttf|woff|eot|svg)$">
    Header set Cache-control "max-age=864000, public, must-revalidate"
    Header unset Last-Modified
    </FilesMatch>
    <FilesMatch "(?i).*\.(html|htm|xml|txt|xsl)$">
    Header set Cache-control "max-age=7200, must-revalidate"
    </FilesMatch>
    </IfModule>
    <IfModule mod_deflate.c>
    <FilesMatch "(?i)\.(js|css)$">
    SetOutputFilter DEFLATE
    </FilesMatch>
    </IfModule>

    ##################
    ## Optional improvements
    ## Requires mod_expires to be enabled within Apache
    ##################
    <ifmodule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A300
    ExpiresByType application/x-javascript A3600
    ExpiresByType text/css A3600
    ExpiresByType image/gif A604800
    ExpiresByType video/x-flv A604800
    ExpiresByType application/pdf A604800
    ExpiresByType text/html A300
    ExpiresByType image/x-icon A86400
    ExpiresByType image/jpeg A2592000
    ExpiresByType image/png A2592000
    </ifmodule>

    I also have this .htacess in the /includes/templates/responsive_sheffield_blue/images folder:
    ##################
    ## Optional caching improvements
    ## Requires mod_header and mod_deflate to be enabled within Apache
    ##################
    <IfModule mod_headers.c>
    Header unset Pragma
    FileETag None
    Header unset ETag
    #Header set Cache-Control "no-transform"
    <FilesMatch "(?i).*\.(ico|jpe?g|gif|webp|png|otf|swf|flv|ttf|woff|eot|svg)$">
    Header set Cache-control "max-age=864000, public, must-revalidate"
    Header unset Last-Modified
    </FilesMatch>
    <FilesMatch "(?i).*\.(html|htm|xml|txt|xsl)$">
    Header set Cache-control "max-age=7200, must-revalidate"
    </FilesMatch>
    </IfModule>
    <IfModule mod_deflate.c>
    <FilesMatch "(?i)\.(js|css)$">
    SetOutputFilter DEFLATE
    </FilesMatch>
    </IfModule>

    ##################
    ## Optional improvements
    ## Requires mod_expires to be enabled within Apache
    ##################
    <ifmodule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A300
    ExpiresByType application/x-javascript A3600
    ExpiresByType text/css A3600
    ExpiresByType image/gif A604800
    ExpiresByType video/x-flv A604800
    ExpiresByType application/pdf A604800
    ExpiresByType text/html A300
    ExpiresByType image/x-icon A86400
    ExpiresByType image/jpeg A2592000
    ExpiresByType image/png A2592000
    </ifmodule>

    ## EXPIRES CACHING##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType application/javascript "access plus 1 year"
    ExpiresByType image/gif "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/pdf "access plus 1 month"
    ExpiresByType text/x-javascript "access plus 1 month"
    ExpiresByType application/x-shockwave-flash "access plus 1 month"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresDefault "access plus 2 days"
    </IfModule>
    ## EXPIRES CACHING##
    I have no other .htacess files within that folder structure.

  6. #16
    Join Date
    Aug 2010
    Location
    Israel
    Posts
    285
    Plugin Contributions
    0

    Default Re: how to use Specify a cache validator the bmz_cache iamges and js,css in template

    @ttfan, try to delete the .htacess in /includes/templates/responsive_sheffield_blue/images/ folder
    And use this .htacess file in /includes/ folder:

    Code:
    #
    # @copyright Copyright 2003-2013 Zen Cart Development Team
    # @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    # @version GIT: $Id: Author: IronLady  Thu Aug 1 16:10:02 2013 +0100 Modified in v1.5.2 $
    #
    # This is used with Apache WebServers
    #
    # The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions
    # It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.
    # Will also prevent people from seeing what is in the dir. and any sub-directories
    #
    # For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.
    # Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified.
    # Example:
    #<Directory "/usr/local/apache/htdocs">
    #  AllowOverride Limit Options Indexes
    #</Directory>
    ###############################
    
    # deny *everything*
    <FilesMatch ".*">
      Order Allow,Deny
      Deny from all
    </FilesMatch>
    
    # but now allow just *certain* necessary files:
    <FilesMatch "(?i).*\.(js|css|html?|ico|jpe?g|gif|webp|png|swf|flv|xml|xsl|otf|ttf|woff|eot|svg)$">
      Order Allow,Deny
      Allow from all
    </FilesMatch>
    
    IndexIgnore */*
    
    <limit POST PUT>
    order deny,allow
    deny from All
    </limit>
    
    
    ## NOTE: If you want even greater security to prevent hackers from running scripts in this folder, uncomment the following line (if your hosting company will allow you to use OPTIONS):
    # OPTIONS -Indexes -ExecCGI
    
    
    
    ##################
    ## Optional caching improvements
    ## Requires mod_header and mod_deflate to be enabled within Apache
    ##################
    <IfModule mod_headers.c>
      Header unset Pragma
      FileETag None
      Header unset ETag
      #Header set Cache-Control "no-transform"
      <FilesMatch "(?i).*\.(ico|jpe?g|gif|webp|png|otf|swf|flv|ttf|woff|eot|svg)$">
        Header set Cache-control "max-age=864000, public, must-revalidate"
        Header unset Last-Modified
      </FilesMatch>
      <FilesMatch "(?i).*\.(html|htm|xml|txt|xsl)$">
        Header set Cache-control "max-age=7200, must-revalidate"
      </FilesMatch>
    </IfModule>
    <IfModule mod_deflate.c>
      <FilesMatch "(?i)\.(js|css)$">
        SetOutputFilter DEFLATE
      </FilesMatch>
    </IfModule>
    
    ##################
    ## Optional improvements
    ## Requires mod_expires to be enabled within Apache
    ##################
    <ifmodule mod_expires.c>
      ExpiresActive On
      ExpiresDefault A300
      ExpiresByType application/x-javascript "access plus 1 week"
        ExpiresByType text/css "access plus 1 week"
      ExpiresByType image/gif A604800
      ExpiresByType video/x-flv A604800
      ExpiresByType application/pdf A604800
      ExpiresByType text/html A300
      ExpiresByType image/x-icon A86400
      ExpiresByType image/jpeg A2592000
      ExpiresByType image/png A2592000
    </ifmodule>

  7. #17
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    231
    Plugin Contributions
    0

    Default Re: how to use Specify a cache validator the bmz_cache iamges and js,css in template

    Thank you gunni, but unfortunately it made no difference...bizarre!!!

    You can see the report here:
    https://gtmetrix.com/reports/tablete...om.au/seKV71Bw

  8. #18
    Join Date
    Apr 2017
    Location
    Netherlands
    Posts
    20
    Plugin Contributions
    0

    Default Re: how to use Specify a cache validator the bmz_cache iamges and js,css in template

    Any update on this subject. I have this:

    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:

    https://www.xx.nl/bmz_cache/0/0061ab...ge.300x300.jpg

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. How do I use my own CSS template?
    By hhalliburton in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 30 Jul 2009, 01:39 PM
  2. How to use the fix cache key Utility?
    By philip56 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 Nov 2008, 09:01 PM
  3. CSS Validator issue - Peek-a-boo? Template Monster template
    By Mickmo68 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 14 May 2008, 02:51 AM
  4. Replies: 2
    Last Post: 3 Mar 2008, 07:29 PM
  5. how can I change the banner image to my own iamges?
    By lina0962 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 11 Jun 2006, 05:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR