Overriding URL Behaviour
Peakhour provides cache and delivery controls for website acceleration and optimisation. These controls manage the communication between the origin server and Peakhour's request path, providing greater control over caching behaviour and minimizing origin requests. This results in improved website performance and a seamless user experience.
Overriding URL handling can be used to customise your Peakhour settings for different sections of your site. For example you might want to customise cache options for your checkout process, or pagespeed optimisation. Rules are ordered with the first matching rule being executed. Some of the configuration options that you may want to override on a per url basis include:
- Force cache: By default, Peakhour uses a set of rules to determine whether a requested file is cacheable or not. This depends on the query string, file type, and headers coming back from the origin header. However, you can tell Peakhour to just cache an asset by enabling the forche cache option.
- Skip Cookie: With this option, you can specify a series of cookies that your application sets on a client. Peakhour will always serve fresh content if these cookies are set, bypassing the cached asset and fetching it from the origin for the request. This is particularly useful for serving dynamic content to logged-in users.
- Query Args: You can remove provided query arguments when considering cached resources, which can be used to strip UTM arguments, for example.
- Serve Stale: If the origin is unavailable, Peakhour can continue to serve stale cached resources, keeping your website up and running even in the face of outages or server failures.
- Normalise User-Agent for Vary: Peakhour normalizes the user agent to device type, such as browser or mobile, which helps to flatten cached responses and improve performance.
- Implicit TTL: If there are no cache headers in an origin response, Peakhour uses a specified number as the TTL (Time to Live) for the cached object.
- Require Cache-Control for Caching: To allow caching, the origin response must have the cache-control header.
- Strip Cookies on Store: Peakhour strips any Set-Cookies headers sent by the origin when saving a response in the cache, improving security and privacy.
These are just some of the features available in Peakhour's cache and delivery controls, and they demonstrate the level of control and customisation that the service provides. Whether you're looking to improve website performance, optimise caching behaviour, or keep your website available during origin outages, Peakhour provides the controls to manage it.
Peakhour's cache and delivery controls support website acceleration and optimisation. With advanced features for controlling communication between the origin server and Peakhour's request path, you can ensure that your website performs at its best and provides a seamless user experience.