Skip to content

RFC: Use /_metadata and /_module functions #185

Description

@mjackson

This is just a heads up for anyone who is currently using the ?meta or ?module query parameters on unpkg. Instead of using a query parameter, we are going to invoke this functionality through the /_metadata and /_module pathname prefixes going forward.

As unpkg grows, we are seeing increasing load at the origin servers from "cache busting" URLs that use always-unique query parameters to bypass Cloudflare's cache. The most common form of this is ?_=timestamp where timestamp is the current timestamp in milliseconds. This approach is used e.g. in jQuery to bypass HTTP caches.

By moving these query parameters into the pathname, we are able to ignore query strings altogether and cache based on pathnames. This should increase our cache hit rate and decrease load at the origin significantly.

The new functions are already live (5df576c) but the names and/or implementation may change based on feedback in this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions