Tag Info

Hot answers tagged

19

Update your Apache configuration to include the directives below as part of your core configuration: # # associate .js with "text/javascript" type (if not present in mime.conf) # AddType text/javascript .js # # configure mod_expires # # URL: http://httpd.apache.org/docs/2.2/mod/mod_expires.html # <IfModule mod_expires.c> ExpiresActive On ...


17

Because you told them not to(see under "Controlling Caching and Snippets"): <meta name="robots" content="noodp,noydir,noarchive,nosnippet"/> ...along with several other things not to do. As to why that is, you'll have to inspect your WordPress installation(settings, SEO plugins) and theme files to figure out exactly where that tag's coming from, ...


14

No, it will not remove your site from the listings, only from the archive. So your NOARCHIVE idea is correct. You can read more about how Google treats all of this on Google's own blog: http://googleblog.blogspot.com/2007/02/robots-exclusion-protocol.html


8

You can put this in your htaccess: <FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$"> ExpiresActive On ExpiresDefault A2592000 </FilesMatch> It will target files with those extensions (ico, flv, jpg and so on) and set the Expires header to be access time (A) plus 30 days (2592000 seconds). You can also add this at the server level if ...


8

You can't really control what headers user agents decide to send to you. If the file in question is in the browser's cache and it decides it need to check for a new version then it will. According to this article, these are the situations browsers will request using If-Modified-Since: The cached entry has no expiration date and the content is being ...


7

Use the Internet Archive's Wayback Machine: http://www.archive.org Note that they only have content from at least six months ago available. Otherwise, you can try using Google's cache by searching for "cache:youroldwebsite.com" or using the "Cached" link on search results.


7

Moving unique static files to your own domain to reduce domain lookups and control expire headers is a good idea, provided you're prepared to check the master files for changes periodically. Moving common static files to your own domain is not always a good idea, because you lose the benefit if they're already cached from another site the user may have ...


7

One commonly used solution is to make your image URLs look something like this: http://www.example.com/path/to/images/1.jpg?v=123456 Here, /path/to/images/1.jpg is the actual URL path of the image, while ?v=123456 is just a dummy query staring tacked onto the end of the URL. The query string can be anything — a version number, a timestamp, a hash ...


6

No. Viewing the source to a site that Google has cached, there is no indication that the CSS, JS, or any images are cached. I tested this by turning off one of my sites, and then looking at the cached version in Google -- it showed just the HTML, without any stylesheets, JavaScript, images, or other externally linked files.


6

The largest contributor to the Internet Archive's web collection has been Alexa Internet. Material that Alexa crawls for its purposes has been donated to IA a few months later. Adding the disallow rule mentioned in the question does not affect those crawls, but the Wayback will 'retroactively' honor them (denying access, the material will still be in the ...


6

Archive.org holds the most complete archive of historical Web content. Their Wayback Machine search tool provides access to around 2,000 terabytes of compressed archived content, and the archive grows at around 20 terabytes a month. Sadly, this means that if you can't find an old defunct site on there, there's a good chance you won't be able to access it ...


5

It depends on what's cached. If it's the main page then the only way to prevent caching is using the no cache HTTP header. However keep in mind that JS and CSS files are also usually cached. One trick to invalidate them when they change used by many websites - including this - is appending a dummy number after the '?'. Everything after the '?' is ignored by ...


5

One option is to send them through a PHP script and have that script out caching headers for you. It accomplishes the same thing with only a little extra overhead for having to have PHP serve the image as a proxy. Example: HTML: <img src="/images/img.php?img=someimage.png"> PHP: <?php $filename = $_GET['img']; $file = '/path/to/file/' . ...


5

The basic model for this is that a domain name points at an IP address, the server machine at that IP address runs web server software, and your web content is on the hard drive of that server machine. Having a domain expire generally means that "www.mydomain.com" no longer points to the same IP address, but it doesn't automatically cause your content to be ...


5

Yes, browsers do cache CSS and JavaScript. Toomanyairmiles has already shown you one way to set the cache lifetime of CSS / JS files in an Apache .htaccess file; another way to do it is to use mod_expires: ExpiresActive On ExpiresByType text/javascript "access plus 1 week" ExpiresByType text/css "access plus 1 week" This tells browsers to cache any CSS / ...


4

Bandwidth is almost a commodity at this point. Especially if you're compressing your files before sending them to the user. And since page speed has been proven to affect not only search rankings but, more importantly, conversion rates, I would say this is not a bad strategy to employ. Just make sure your caching engine accounts for updates to any of the ...


4

It's definitely a caching issue. There are a few ways to correct thisThe simplest way is to append a unique value as a query string to the name of the image so it always appear to be new to the browser and it requests the image evrey time. Using a timestamp is the easiest way to do this. <img src="/images/weatherupdate.png?19591782466" width='100" ...


4

Here's some related information from Google themselves: http://www.google.com/support/webmasters/bin/answer.py?answer=164133&cbid=-a2l7h00q1r9q&src=cb&lev=%20answer


4

Guess it depends on what you mean by cache. Database query caching - in many cases it makes sense to cache queries in memcached or even serialized to disk Page fragment caching - if you have portions of your page that are semi-dynamic, it can sometimes make sense to persist those to memory or disk rather than having to re-generate them on every page load ...


4

If the page load is 20 seconds then there is likely a major bottleneck somewhere. APC might reduce it to 5-10 seconds but that's still not really good enough for the server-side. And it won't help if the bottleneck is a SQL query. Modules can slow the site a little but not by that much. Try disabling each one in turn to see if there are any big ...


4

This wasn't possible when you asked the question. This is now possible with PageRules. Note: You want to exclude the admin section of your site with a PageRule as well. If you do cache everything and the admin section is included, you will likely see some sort of looping error.


4

Cloaking is when you intentionally serve different content to search engines then to your users for the sake of manipulating the search results. That isn't the case here. Search engines seeing different content will only occur once if the cache is created and saved after the page's initial visit. And even then it will only happen if the search engine is ...


4

I use the following to set far future expiration dates for all media files: <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|ico|js|css|swf)(\.gz)?$"> Header set Expires "Thu, 15 Apr 2020 20:00:00 GMT" Header unset ETag FileETag None </FilesMatch> and I'd recommend using it because it will help out on the bandwidth and speed front's but this code ...


4

Use development mode. You can also manually purge the cache.


4

This should do the trick: header("HTTP/1.0 302 Moved Temporarily"); header("Location: example.com/whatever"); header("Cache-Control: private"); header("Vary: User-Agent, Accept-Encoding"); exit; The recommendation for the Vary header is from this google developer page about optimizing caches (and problems with some IE < 9). Background on caching ...


4

You should login to Google Webmaster Tools and do a fetch as Google, if the page returns a status 200 then you know that your pages are working as intended and what your experiencing is just the Google cache service not working, which should resolve itself in time. Google Cache is not Realtime It's worth mentioning that the Google cache system runs ...


3

Use a opcode cache like APC Use a tool like xDebug to see where your bottlenecks are. That way you know what you need to address instead of just guessing.


3

It really depends on which browser you were using. If it was Firefox, then try typing this in address bar: about:cache. You will be interested in disk cache: about:cache?device=disk. This will give you an idea of what you can still find in a cache. Unfortunately this will not work in all browsers. If you are on Windows, try these free programs: ...


3

Probably your website is too optimized for speed. If your server uses Apache you can change the default config by adding an .htaccess file with the configuration that works for you. There are many web pages on the Internet that can help you on this task, like for example: http://www.askapache.com/htaccess/speed-up-sites-with-htaccess-caching.html Please ...



Only top voted, non community-wiki answers of a minimum length are eligible