Fasterize allows you to simply define the optimization rules that you want to activate and to establish any applicable exceptions. This article explains, rule by rule, how to proceed.
For each rule, it is possible to define a list of pages blacklisted (the rule will not apply to these urls) or whitelisted (this rule applies only to these url).
Reducing the size of resources
The size of resources can be reduced on the fly by minifying JS, CSS and HTML files and optimizing images.
Minification makes it possible to compact files by removing on the fly superfluous characters (spaces, comments ...). This optimization saves several KB which has a direct impact on loading time and bandwidth.
Comments with important information
Comments are sometimes used for monitoring probes or data recovery scripts in pages.
In this case, it is possible to keep the comments during the minification by ticking a box. This option appears by clicking on the "More Options" wrench.
Optimization of PNG, JPEG, GIF and SVG images
Add a version to each static resource
Adding version to static resources provides a new unique URL for each resource during a flush by adding a version parameter. During a future navigation, the browser downloads the new URL present in the page. The referencing of the new URL causes an update of all the caches (CDN, browser, ...)
Caching non-cacheable pages for anonymous users
This rule is useful for the case of users without a session. Fasterize serves the generic page from its cache that does not contain session-specific customization. As soon as a session is established, this system is inactive.
Remove static resource settings
Random settings on static resources prevent effective caching
Specify the settings that will be deleted (one per line). Leave blank to delete all settings
Reduction of the number of requests
There are cases where this optimization is irrelevant.
File already very big
When a JS or CSS file, even a thin one, is still very big, it becomes superfluous to concatenate it with other files: it can be more interesting to make several requests than to make requests that are too big. In this case, the file too big can be blacklisted.
Optimizing the rendering of the page
This rule optimizes display performance on the browser by moving style sheet declarations to the top of the page.
- by adding it to the exclusion rules by URL (blacklist)
- adding the nodefer attribute in the script tag
Two parameters make it possible to refine the deferred loading rule of the JS files, they are accessible behind the wrench.
Limit deferred loading to external domains
Preloading deferred scripts
Add a link tag rel = preload for each deferred script
Inclusions of small images in web pages
This rule includes small images directly in the HTML code and thus saves the time of queries made for each image. This is especially important for mobile sites.
Delayed loading of non-visible images
Downloading only visible images saves bandwidth, queries and does not block the rendering of the page.
Parallel loading of multiple domains without cookie
Browsers only open a limited number of simultaneous requests on the same domain. Using multiple domains bypasses this limit. No cookies are placed on the new domains.
Lifts an HTTP 1.1 limit
Objective: Increase the ability to download resources in parallel bypassing the limits of browsers (in HTTP 1.1, 6 to 8 resources can be called in parallel depending on the browser).
The resources are distributed over several domains (of type s0.frz.io and s1.frz.io).
Benefits to use these areas:
- these are domains without a cookie, which saves the sending of the cookie to each request
- these domain names can be resolved on the Fasterize CDN or the client's CDN without complex configuration
The over-use of sharding can cause too many DNS resolutions, which has a cost to load the page.
Objective: to reduce the number of domains used to take advantage of the single connection of HTTP 2 = reduce the number of DNS resolutions and TLS negotiations.
- Fewer DNS resolutions
- Fewer connections to establish
- Fewer HTTPS "negotiations"
Rewrite URLs using the domain of the page
The URLs of 'unsharded' resources will be rewritten using the domain of the page to minimize the number of DNS resolutions or to reuse the CDN of the website for external resources.
Custom HTML tags
Optimizing images whose source is in a custom HTML tag
Extend image optimizations to custom HTML tags
If a page is broken
It is possible to disable rules for a given page by adding a specific parameter to the url:
[rule] is to be replaced by the correct name. The list of rule names is available here .
If a page is broken because of a rule, it is possible
- to disable the rule for this page (blacklist)
- to exclude the page from all optimizations
- to disable the rule for all pages
The most likely rules to break the pages are in order:
- Concatenation: if a syntax error JS or CSS at the end of a single file (and being hidden) is in the middle of the file via the concatenation
- Minification: Rare Cases Where Invalid HTML Causes Errors
- Lazyloading: rare cases where lazyloading already exists but has not been detected by Fasterize
In case of real concern, there is an on / off button on the dashboard that allows to stop optimizations instantly (but the traffic still goes through the platform).
More details on this page.