Skip to main content
ModPageSpeed 2.0: AVIF, WebP, and critical CSS — up to 69% less page weight on the live demo

PageSpeed markers reference

If you are looking at a page served through mod_pagespeed or ModPageSpeed, you will run into markers it leaves behind: HTML attributes like data-pagespeed-no-defer, query parameters like ?PageSpeed=off, rewritten .pagespeed. resource URLs, a beacon endpoint, and a response header. This page documents what each marker means, where it shows up, and how to set the ones you control.

data-pagespeed-no-defer

HTML attribute

Excludes a <script> from the defer_javascript filter, so that script runs during page load instead of being deferred to onload.

When you see it: You add it by hand to a script that must execute inline — for example a script that other inline code depends on, or one that writes to the page before load. The deprecated spelling is pagespeed_no_defer; the combine_javascript filter also leaves scripts carrying it alone. The lazyload_images filter honors the same attribute on an <img> to leave that image eagerly loaded.

<script data-pagespeed-no-defer>
  // runs in place, not deferred to onload
</script>

data-pagespeed-no-transform

HTML attribute

Tells the image filters to leave a specific element alone — no recompression, no resizing, no srcset injection.

When you see it: You add it to an <img> (or other element) you want delivered exactly as authored — a pixel-perfect asset, a tracking pixel, or an image another script measures. The legacy spelling is pagespeed_no_transform. The element may still be cache-extended.

<img src="logo.png" width="160" height="40" data-pagespeed-no-transform>

?PageSpeed=off

Query parameter

Disables optimization for a single request, so the origin response is served unrewritten. ?PageSpeed=on forces it back on.

When you see it: You append it while debugging to compare optimized vs. unoptimized output for one URL. On Apache the equivalent legacy spelling is ?ModPagespeed=off. These three values — on, off, and noscript — are honored without a token; any other query-parameter override requires the RequestOptionOverride token configured on the server.

https://example.com/page.html?PageSpeed=off

?PageSpeed=noscript

Query parameter

The no-JavaScript fallback URL. Filters that inject client-side JavaScript also inject a <noscript> meta-refresh that redirects no-JS browsers to this variant, which serves the page without the JS-dependent rewrites.

When you see it: You see ?PageSpeed=noscript (or ?ModPagespeed=noscript) in your address bar after landing on a page with JavaScript disabled, or in the injected <noscript> block in page source. The filters that add it include lazyload_images, inline_preview_images, inline_images, and prioritize_critical_css. The SupportNoScript option controls whether the <noscript> block is inserted.

<noscript>
  <meta http-equiv="refresh" content="0;url='/page.html?PageSpeed=noscript'">
</noscript>

.pagespeed. resource URLs

URL pattern

The naming scheme for rewritten static assets. The two-letter code identifies which filter produced the resource; the hash is a content hash that lets the module cache-extend the URL with a long max-age and still invalidate it when the bytes change.

When you see it: You see these in page source and the network tab in place of the original CSS, JS, and image URLs. The shape is original-name.pagespeed.<code>.<hash>.<ext>. Common codes: ic = image recompress/resize, ce = cache extend, jm = JavaScript minify, cf = CSS rewrite/minify, jc = combine JavaScript, cc = combine CSS.

logo.png.pagespeed.ic.GpQ1A7n5Kz.png
site.css.pagespeed.cf.j7l9m2Xp4Q.css
app.js.pagespeed.jm.kZ3w8tRq1Lp.js

mod_pagespeed_beacon / ngx_pagespeed_beacon

Endpoint

The instrumentation beacon endpoint. JavaScript injected by certain filters reports measurements to it: page-load timing from add_instrumentation as a GET, and which images and CSS are above the fold from the critical-image and critical-CSS beacons as a POST.

When you see it: You see requests to /mod_pagespeed_beacon (Apache) or /ngx_pagespeed_beacon (nginx) in your access log or network tab. The default path is set by the ModPagespeedBeaconUrl directive. The data feeds the optimizer: it learns the critical viewport and prioritizes those images and CSS on later requests.

GET /ngx_pagespeed_beacon?ets=load:312  →  204

data-pagespeed-lazy-src

HTML attribute

Holds the real image URL while the lazyload_images filter is active. The filter rewrites <img src> to data-pagespeed-lazy-src and swaps it back in JavaScript once the image scrolls near the viewport.

When you see it: You see it on <img> tags in rendered source when lazyload_images is enabled. If images are not loading and you have JavaScript disabled, this is why — the no-JS fallback above (?PageSpeed=noscript) exists to serve those images normally.

<img data-pagespeed-lazy-src="/photo.jpg" src="/data:image/gif;base64,...placeholder...">

data-pagespeed-url-hash

HTML attribute

A hash of an image’s original URL, written onto <img> tags by the critical-image beacon. It lets the beacon report which images were in the initial viewport without the client knowing anything about the module’s URL rewriting.

When you see it: You see it alongside the beacon machinery when critical-image beaconing is on. It is bookkeeping for the optimizer, not something you set — the server matches the reported hash back to the original image to learn what was above the fold.

X-Page-Speed / X-Mod-Pagespeed

Response header

Identifies the module and its version on every response it touches. nginx and IIS emit X-Page-Speed; Apache emits X-Mod-Pagespeed.

When you see it: You see it in response headers when the module is active. Use it to confirm an optimizer is in the request path and which version is running. The header text is configurable via the XHeaderValue directive.

X-Page-Speed: 1.15.0.0

Why these markers exist

Every marker above is a side effect of an automatic optimization. The module recompresses and resizes images, minifies and rewrites CSS and JavaScript, extends cache lifetimes on static assets, and inlines critical CSS. Those rewrites cut byte weight and render-blocking and change image delivery, which is what drives Largest Contentful Paint and image-driven layout shift. The filters do not rewrite your application code, so interaction responsiveness (INP) and most layout-reservation work stay in your hands.

Running an older build?

If you are seeing these markers, you have a PageSpeed module in the request path. mod_pagespeed 1.15 is the maintained continuation of the open-source module, kept up by a former mod_pagespeed maintainer with CVE patches. It uses the same directives and filter names, so existing configuration carries over. It is free to install; a license is required for production optimization.

A commercial license is required for production use.

PageSpeed markers: common questions

What is data-pagespeed-no-defer?
It is an HTML attribute that excludes a single <script> from the defer_javascript filter, so that script runs during page load instead of being deferred to the onload event. Add it to a script that must execute inline — for example one that other inline code depends on. The older spelling pagespeed_no_defer does the same thing.
I see .pagespeed. URLs in my page source — what are they?
They are static assets the optimizer rewrote. The format is original-name.pagespeed.<code>.<hash>.<ext>: the two-letter code says which filter produced the file (ic for image recompression, ce for cache extension, jm for JavaScript minification, cf for CSS rewriting), and the hash is a content hash that lets the module serve the URL with a long cache lifetime and still invalidate it when the bytes change.
I see POSTs to mod_pagespeed_beacon — what is the beacon?
It is the instrumentation endpoint. JavaScript injected by filters such as add_instrumentation and the critical-image and critical-CSS beacons POSTs measurements back to /mod_pagespeed_beacon (Apache) or /ngx_pagespeed_beacon (nginx): page-load timing and which images and CSS were above the fold. The optimizer uses that to prioritize the right resources on later requests. The path is configurable with the ModPagespeedBeaconUrl directive.
How do I turn optimization off for one request to debug?
Append ?PageSpeed=off to the URL (?ModPagespeed=off on older Apache builds). The origin response is then served unrewritten, which lets you compare optimized and unoptimized output for the same page. ?PageSpeed=on forces it back on. These two values, plus ?PageSpeed=noscript, are honored without the RequestOptionOverride token; any other override needs that token.
Is mod_pagespeed still maintained?
Yes. mod_pagespeed 1.15 is the maintained continuation of the open-source module, kept up by a former mod_pagespeed maintainer with CVE patches. It keeps the same directives and filter names, so existing configuration carries over. ModPageSpeed 2.0 is a from-scratch rebuild that runs as an nginx reverse proxy or ASP.NET Core middleware.