The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Leverage browser caching Nginx

    Leverage browser caching Nginx

    Technical SEO Issues
    2 2 2.5k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MPO
      MPO last edited by

      Hi there,

      Does anyone have any experience with leverage browser caching on Nginx?

      Every time I run the pagespeed test from Google my site comes up with this as a high priority issue that needs to be addressed.

      I can see that it is mostly images that doesn't have an expiry date and tried putting the following into my conf file:

      location ~* .(jpg|jpeg|gif|css|png|js|ico)$ {
      expires max;
      }

      But this results in breaking my page off and all elements where out of place and missing images.

      Also tried excluding css and js but hen all images where still missing.

      My site is running on Drupal and I use APC for PHP to increase the load time on the site.

      Hope somebody might be able to help me out.

      1 Reply Last reply Reply Quote 0
      • Naghirniac
        Naghirniac last edited by

        Man, you have a difficult case... I not sure what is happening, but in my page I used this code:

        <filesmatch ".(ico|jpg|jpeg|png|gif|swf|css|js)$"=""></filesmatch> Header set Expires "Sun, 30 Apr 2090 20:00:00 GMT" Header set Last-Modified "wed, 20 fev 2012 09:00:00 GMT"

        You should try this. And try to clean your browser cache.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        • Google Cache issue
          willcritchlow
          willcritchlow
          0
          4
          461

        • Googlebots and cache
          DirkC
          DirkC
          0
          2
          57

        • Cached version of website
          DSM_UK
          DSM_UK
          0
          2
          115

        • Https Cached Site
          TheBatesMillStore
          TheBatesMillStore
          0
          3
          62

        • Website cache?
          Ideas-Money-Art
          Ideas-Money-Art
          0
          5
          71

        • Caching issues with Alltop
          Peter_Dean
          Peter_Dean
          0
          4
          481

        • Sandbox Cached
          KeriMorgret
          KeriMorgret
          0
          3
          936

        • Cache my page
          tylerfraser
          tylerfraser
          0
          9
          1.2k

        Get started with Moz Pro!

        Unlock the power of advanced SEO tools and data-driven insights.

        Start my free trial
        Products
        • Moz Pro
        • Moz Local
        • Moz API
        • Moz Data
        • STAT
        • Product Updates
        Moz Solutions
        • SMB Solutions
        • Agency Solutions
        • Enterprise Solutions
        • Digital Marketers
        Free SEO Tools
        • Domain Authority Checker
        • Link Explorer
        • Keyword Explorer
        • Competitive Research
        • Brand Authority Checker
        • Local Citation Checker
        • MozBar Extension
        • MozCast
        Resources
        • Blog
        • SEO Learning Center
        • Help Hub
        • Beginner's Guide to SEO
        • How-to Guides
        • Moz Academy
        • API Docs
        About Moz
        • About
        • Team
        • Careers
        • Contact
        Why Moz
        • Case Studies
        • Testimonials
        Get Involved
        • Become an Affiliate
        • MozCon
        • Webinars
        • Practical Marketer Series
        • MozPod
        Connect with us

        Contact the Help team

        Join our newsletter
        Moz logo
        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
        • Accessibility
        • Terms of Use
        • Privacy