background preloader

Caching Tutorial for Web Authors and Webmasters

Caching Tutorial for Web Authors and Webmasters
for Web Authors and Webmasters This is an informational document. Although technical in nature, it attempts to make the concepts involved understandable and applicable in real-world situations. Because of this, some aspects of the material are simplified or omitted, for the sake of clarity. If you are interested in the minutia of the subject, please explore the References and Further Information at the end. What’s a Web Cache? A Web cache sits between one or more Web servers (also known as origin servers) and a client or many clients, and watches requests come by, saving copies of the responses — like HTML pages, images and files (collectively known as representations) — for itself. There are two main reasons that Web caches are used: To reduce latency — Because the request is satisfied from the cache (which is closer to the client) instead of the origin server, it takes less time for it to get the representation and display it. Kinds of Web Caches Browser Caches Proxy Caches Gateway Caches

Tester la vitesse de chargement de votre site avec Slowcop Un aspect très important pour un blog ou un site Web est son temps de chargement. Une page est constituée de multiples éléments provenant de diverses sources qui peuvent constituer autant de goulots d’étranglement. L’internaute n’est pas du genre patient, il convient donc d’accélérer au maximum les choses en évitant des temps de chargements trop rédhibitoires qui vont faire fuir vos visiteurs et pénaliser votre site en terme de référencement naturel car les robots de Google prennent en compte ce paramètre. Slowcop est un service Web permettant de tester le temps de chargement des différents constituants d’une page : images, redirections, Widgets, JavaScript, éléments publicitaires… Aucune inscription n’est nécessaire pour utiliser ce service. Au bout de quelques secondes, un rapport d’analyse est affiché. Il convient bien sûr de faire le test plusieurs fois avant de passer à la phase de résolution : éléments non trouvés à effacer, images à amincir, widget à supprimer… Source – Slowcop

Speeding Up Websites With YSlow We all know there are countless reasons why web page load-times skyrocket, however, pinpointing the problem may be costly in both time and money. So why waste the effort when someone else—or something else—can do all the dirty work for you? Meet Yahoo's YSlow, a free web page analyzer for Firefox. Getting Started YSlow has two requirements: YSlow piggybacks onto Firebug, so you will need to install the add-ons in the order listed above before continuing. The Problem Web designers, developers and copywriters strive to have the most unique and interesting content when compared to their competitors. You may have spent days perfecting your new blog post and nearly fallen off your chair with excitement when viewing it for the first time. The Solution: Yahoo's YSlow for Firefox Website analysis tools generally fall into two categories: Search engine optimization Analysis of the Document Object Model's (DOM) performance. YSlow fits into the latter. There are three views: Grade ComponentsStatistics. 1.

Rack::Cache Rack::Cache is suitable as a quick drop-in component to enable HTTP caching for Rack-based applications that produce freshness (Expires, Cache-Control) and/or validation (Last-Modified, ETag) information. Standards-based (see RFC 2616 / Section 13).Freshness/expiration based cachingValidationVary supportPortable: 100% Ruby / works with any Rack-enabled framework.Disk, memcached, and heap memory storage backends. News Rack::Cache 1.0 was released on December 24, 2010. Installation $ sudo gem install rack-cache Or, from a local working copy: $ git clone $ rake package && sudo rake install Basic Usage Rack::Cache is implemented as a piece of Rack middleware and can be used with any Rack-based application. require 'rack/cache' use Rack::Cache, :verbose => true, :metastore => 'file:/var/cache/rack/meta', :entitystore => 'file:/var/cache/rack/body' run app More See Also Rack::Cache takes (liberally) various concepts from Varnish and Django’s cache framework.

Pourquoi et comment créer un sitemap ? Les sitemaps vous aident à organiser votre site Web. Ils aident également les moteurs de recherche atteignant chacune de vos pages contenant votre site Web et de le retourner dans les requêtes de recherche publiées par les utilisateurs. Dans cet article je vais vous expliquer pourquoi les sitemaps sont importants et comment en créer pour votre site Web. Nous examinerons pour cela deux méthodes automatisées et manuelles pour créer un sitemap. Avant d’entrer dans le détail, voyons à quoi vous servent les sitemaps sur votre site Web. Un sitemap est un moyen facile pour les webmasters d’indiquer aux moteurs de recherche les pages de leurs sites qui sont disponibles pour l’analyse. Les moteurs de recherche Web analysent généralement les liens des pages dans le site mais également sur d’autres sites. Il existe deux types principaux de sitemap : ceux en HTML et ceux en XML. XML est un langage de codage utilisé comme standard par les robots d’indexations pour trouver et analyser le sitemap.

The SMAQ stack for big data “Big data” is data that becomes large enough that it cannot be processed using conventional methods. Creators of web search engines were among the first to confront this problem. Today, social networks, mobile phones, sensors and science contribute to petabytes of data created daily. To meet the challenge of processing such large data sets, Google created MapReduce. As MapReduce has grown in popularity, a stack for big data systems has emerged, comprising layers of Storage, MapReduce and Query (SMAQ). Though dominated by Hadoop-based architectures, SMAQ encompasses a variety of systems, including leading NoSQL databases. MapReduce Created at Google in response to the problem of creating web search indexes, the MapReduce framework is the powerhouse behind most of today’s big data processing. To understand how MapReduce works, look at the two phases suggested by its name. A simple example of MapReduce is the task of counting the number of unique words in a document. Hadoop MapReduce Storage

Caching with Rails: An overview 1 Basic Caching This is an introduction to three types of caching techniques: page, action and fragment caching. Rails provides by default fragment caching. To start playing with caching you'll want to ensure that config.action_controller.perform_caching is set to true, if you're running in development mode. 1.1 Page Caching Page caching is a Rails mechanism which allows the request for a generated page to be fulfilled by the webserver (i.e. 1.2 Action Caching Page Caching cannot be used for actions that have before filters - for example, pages that require authentication. 1.3 Fragment Caching Life would be perfect if we could get away with caching the entire contents of a page or action and serving it out to the world. Fragment Caching allows a fragment of view logic to be wrapped in a cache block and served out of the cache store when the next request comes in. and you can expire it using the expire_fragment method, like so: You can also use an Active Record model as the cache key: Feedback

How to access blocked websites – Top 10 Before you try out any of the methods listed here, I suggest you install Firefox browser. For faster and smoother internet access, Firefox is the best browser available out there. When you are accessing proxy sites or similar sites ensure that you use Firefox not Internet Explorer. Internet censoring is now everywhere. In my office Orkut is blocked since there was an Orkut virus scare. Countries such as China, Saudi Arabia etc. routinely block many websites. Last week I did an investigation into the various methods available for bypassing website access restrictions. Top Ten methods to access banned websites 1. 2. 3. Following are some services which still works(free!) Anonymouse – This works, but URL is visible and hence may be blocked by the filtering software. 4. Altavista Babel fish – In the above replace www.webstuffscan.com with the site you want. 5. 6. 7. 9. 8. Use Apache Web server as proxy server – A bit complex setup.Use Privoxy – – This is the recommended approach. 10.

High Performance Web Sites :: Velocity: Forcing Gzip Compression Tony Gentilcore was my officemate when I first started at Google. I was proud of my heritage as “the YSlow guy”. After all, YSlow was well over 1M downloads. After a few days I found out that Tony was the creator of Fasterfox – topping 11M downloads. During that time, Tony was working with the Google Search team and discovered something interesting: ~15% of users with gzip-capable browsers were not sending an appropriate Accept-Encoding request header. Tony is now working on Chrome, but the discovery he made has fueled the work of Andy Martone and others on the Google Search team to see if they could improve page load times for users who weren’t getting compressed responses. For requests with missing or mangled Accept-Encoding headers, inspect the User-Agent to identify browsers that should understand gzip. During his presentation at Velocity, Forcing Gzip Compression, Andy describes how Google Search implemented this technique: The savings are significant.

Seven Advanced Rails Fragment Cache Techniques | CRAZ8 Blog The Rails Fragment Cache is the easiest way of making your view template code run fast. A fragment is a piece of generated output, usually HTML, that is a part of the total output, usually the HTML page, that is returned to a user. The documentation on caching with Rails explains the basics, but doesn’t go into any depth, especially for new use cases and techniques that have been developed and expanded over the last year or so. Here are six techniques and tools that can make your fragment caching easy to manage yet provide the benefits of turbo-charging your view rendering. Don’t Expire Fragments using expire_fragment Frankly, don’t use this. Expire by time If you are using a memcache store for your Rails cache store - and your really should be - then you have the option of expiring fragments by time. <% cache @post, :expire_in => 2.hours %><%= render @post %><% end %> For some use cases, this technique is very useful. Generational (or Key) Expiry Advanced Generational Expiry Summary

Related: