Speculation Rules setup
Store
> Configuration
> Swissup
> Speculation Rules
Main section
Option | Description |
---|---|
Enable | Allows to enable/disable module per store view |
Speculation Rules | Textarea allows to change predefined Speculations Rules |
Speculation rules take the form of a JSON structure that determine what resources should be prefetched or prerendered by the browser. This is part of the Speculation Rules API.
Predefined Rules
{
'prerender': [{
'source': 'document',
'where': {
'and': [
{ 'href_matches': '/*' },
{ 'not': {'selector_matches': [ '.action', '.skip-prerender']}},
{ 'not': {'selector_matches': '[rel~=nofollow]'}},
{ 'not': {'href_matches': [
'checkout',
'customer',
'search',
'catalogsearch',
'product_compare',
'wishlist'
]}}
]
},
'eagerness': 'moderate'
}]
}
See also
Great! Now you might want to see previous: