Skip to main content

Pre-fetch and cache resources referenced in HTML

Prefetching fetches and caches files referenced in HTML before the user requests them, improving load time and reducing origin requests. It applies to a wider set of resources than caching alone.

Configure prefetching

  1. Access the SafeSquid User Interface and click Configure.

    Configure page

  2. Navigate to Prefetching under Application Setup.

    Prefetching section

  3. Ensure Global section has Enabled set to True.

    Global enabled

  4. Click the Prefetch tab.

    Prefetch tab

  5. Click Add New to create a new policy.

    Add new policy

  6. Enter an appropriate comment for future reference.

    Policy comment

  7. Specify the HTML tag to analyze for prefetchable URLs.

    HTML tag specification

  8. Specify the attribute of the HTML tag holding the URL to prefetch.

    Tag attribute

  9. Specify the regular expression to evaluate discovered URLs in the tag attribute.

    URL regex

  10. Click Save Policy.

    Save policy

  11. Click Save Config to apply the configuration.

    Save config

    Configuration saved