Leverage browser caching Nginx
-
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.
-
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.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Page not cached
Hi there, we uploaded a page but unfortunately didn't realise it had noindex,nofollow in the meta tags. Google had cached it then decached it (i guess thats possible) it seems? now it will not cache even though the correct meta tags have been put in and we have sent links to it internally and externally. Anyone know why this page isn't being cached, the internal link to it is on the homepage and that gets cached almost every day. I even submitted it to webmaster tools to index.
Technical SEO | | pauledwards0 -
My beta site (beta.website.com) has been inadvertently indexed. Its cached pages are taking traffic away from our real website (website.com). Should I just "NO INDEX" the entire beta site and if so, what's the best way to do this? Please advise.
My beta site (beta.website.com) has been inadvertently indexed. Its cached pages are taking traffic away from our real website (website.com). Should I just "NO INDEX" the entire beta site and if so, what's the best way to do this? Are there any other precautions I should be taking? Please advise.
Technical SEO | | BVREID0 -
Pages not being cached have a negative effect?
Hi all! I look after a website where it's been discovered a section of the website has the noarchive robots meta tag active on it causing it to not get cached but has been indexed. Out of curiosity has anyone seen any negative effects from Google for having pages that aren't cached? It's not the strongest section on the website so makes it tricky to judge myself but interested if anyone had any thoughts on the matter. Cheers,
Technical SEO | | thisisOllie0 -
Google Cache Date Reverted - Anyone Seen This Before?
Yesterday I was checking the cache date of page of a client. Today the snapshot date has been reversed/reverted. Yesterday it displayed "It is a snapshot of the page as it appeared on 19 Apr 2013" whereas today it reads "It is a snapshot of the page as it appeared on 4 Apr 2013". Has anyone seen this before? Thanks in advance.
Technical SEO | | PhilYarrow1 -
Missing Cache - very strange
Anyone have experience with a cache going missing from a page that had a cache in the past? We’re overhauling a page and noticed the cache was gone from Google results. We don’t know if this event is good/bad/doesn’t matter but I am curious why this happens. I am positive the cache was missing before we updated the page today because a programmer mentioned they did try checking for a cache for a historical load time prior to today for a different project. I have attached two screenshots to illustrate two things: 1) What google delivers for a cache: of the page instead of the normal cache page 2) Even though you can see a cache of any of the indexed pages we have from a serp, the cached link is missing in serps for the mentioned page Has anyone seen this before? thanks! IhnAf SL8ax
Technical SEO | | CouponCactus0 -
Every time google caches our site it shows no website.
Our site <cite>www.skaino.co.uk/</cite> seems to be having real issues with being picked up with Google. The site has been around for a long time but no longer even ranks on google if you search for the word 'Skaino'. This is odd as its hardly a competitive keyword. If I do a site:www.skaino.co.uk then it shows all the pages proving the site has been indexed. But if I do cache:www.skaino.co.uk it shows a blank cache. I'm starting to worry that Google isn't able to crawl our site properly. If it helps to clarify we have a flash site with a HTML site running underneath for those who cant view flash. Im wandering if I've missed something glaringly obvious. Is it normal to have a blank google cache? Thanks AJ
Technical SEO | | handygammon0 -
Strange cache - what could be the reason
The cache of one of our site is being displayed in a strange way in Google. The site in question is - http://www.ugwebmart.com/en/ The cache is shown like this - Title is shown first description Followed by URL What could be the reason for this. Normally, cache is shown in a box like this ..... in a rectangular box This is Google's cache of .... . It is a snapshot of the page as it appeared on...
Technical SEO | | seoug_20050 -
I am wondering if I should use the Meta 'Cache" tag?
I am working on removing unnecessary meta tags that have little impact on SEO and I have read so many mixed reviews about using the Meta 'Cache' tag. I need to informative information on whether or not this tag should be used.
Technical SEO | | ImagetecLP0