Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #793528

    Hi Team Kriesi, can I use this htaccess code to minify my cache?
    <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault “access plus 1 month”

    # CSS
    ExpiresByType text/css “access plus 1 year”

    # Data interchange
    ExpiresByType application/json “access plus 0 seconds”
    ExpiresByType application/xml “access plus 0 seconds”
    ExpiresByType text/xml “access plus 0 seconds”

    # Favicon (cannot be renamed!)
    ExpiresByType image/x-icon “access plus 1 week”

    # HTML components (HTCs)
    ExpiresByType text/x-component “access plus 1 month”

    # HTML
    ExpiresByType text/html “access plus 0 seconds”

    # JavaScript
    ExpiresByType application/javascript “access plus 1 year”

    # Manifest files
    ExpiresByType application/x-web-app-manifest+json “access plus 0 seconds”
    ExpiresByType text/cache-manifest “access plus 0 seconds”

    # Media
    ExpiresByType audio/ogg “access plus 1 month”
    ExpiresByType image/gif “access plus 1 month”
    ExpiresByType image/jpeg “access plus 1 month”
    ExpiresByType image/png “access plus 1 month”
    ExpiresByType video/mp4 “access plus 1 month”
    ExpiresByType video/ogg “access plus 1 month”
    ExpiresByType video/webm “access plus 1 month”

    # Web feeds
    ExpiresByType application/atom+xml “access plus 1 hour”
    ExpiresByType application/rss+xml “access plus 1 hour”

    # Web fonts
    ExpiresByType application/font-woff2 “access plus 1 month”
    ExpiresByType application/font-woff “access plus 1 month”
    ExpiresByType application/vnd.ms-fontobject “access plus 1 month”
    ExpiresByType application/x-font-ttf “access plus 1 month”
    ExpiresByType font/opentype “access plus 1 month”
    ExpiresByType image/svg+xml “access plus 1 month”
    </IfModule>

    #793536

    Hey MBarkhau,

    This should work, however you just have to test and make sure to confirm. Are you trying to avoid the use of a plugin?

    Best regards,
    Jordan Shannon

    #793566

    Hi Jordan.-), many thanks for fast response I would like to use the code with yoast in the htaccess file, there it is possible. Many plugins which are recommended via wordpress unfortunately no longer maintained- How can I hide the Information about Javascript of my homepage?
    Best regards
    MBark

    #793574

    Hi,
    It is not possible to hide Javascript from the user, since their browser needs to download it to execute it. The only other option is obfuscation

    Best regards,
    Jordan Shannon

    #793580

    Sorry, I’m not as stupid as it looks here .-) how can I obfuscation?
    Best regards,
    MBark

    #793623

    Hi,

    You can use an online service, however this may be overkill as you would need to do this for all js files on your site if you are truly worried about security, and it may only give you minimal, if any, return on your time investment to do so.

    Best regards,
    Jordan Shannon

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.