PHPackages                             9gag-open-source/mobiledetect-varnish - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. 9gag-open-source/mobiledetect-varnish

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

9gag-open-source/mobiledetect-varnish
=====================================

Varnish VCL device-detect based on Mobile\_Detect

0.2.0(8y ago)157MITPHP

Since Sep 28Pushed 8y ago1 watchersCompare

[ Source](https://github.com/9gag-open-source/mobiledetect-varnish)[ Packagist](https://packagist.org/packages/9gag-open-source/mobiledetect-varnish)[ RSS](/packages/9gag-open-source-mobiledetect-varnish/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Mobile\_Detect Varnish
======================

[](#mobile_detect-varnish)

A tool to generate VCL function for Varnish using rules from Mobile\_Detect.

Based on [varnish-mobiletranslate](https://github.com/willemk/varnish-mobiletranslate).

Intended to be a drop-in replacement for [devicedetect](https://github.com/varnishcache/varnish-devicedetect).

Installation
------------

[](#installation)

```
composer install 9gag-open-source/mobiledetect-varnish

```

Generating Varnish VCL
----------------------

[](#generating-varnish-vcl)

```
$generator = new \Detection\MobileDetect\Varnish\DeviceDetect();
echo $generator->generateVcl();
```

Using the VCL
-------------

[](#using-the-vcl)

Include the generated code in your Varnish VCL. The devicedetect function adds a `X-UA-Device` header to the request.

Device TypeX-UA-DevicePhonemobileTablettabletCrawler botsbotOtherdesktop

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

3242d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14237112?v=4)[Derek Chan](/maintainers/derek9gag)[@derek9gag](https://github.com/derek9gag)

---

Top Contributors

[![derek9gag](https://avatars.githubusercontent.com/u/14237112?v=4)](https://github.com/derek9gag "derek9gag (10 commits)")

### Embed Badge

![Health badge](/badges/9gag-open-source-mobiledetect-varnish/health.svg)

```
[![Health](https://phpackages.com/badges/9gag-open-source-mobiledetect-varnish/health.svg)](https://phpackages.com/packages/9gag-open-source-mobiledetect-varnish)
```

###  Alternatives

[shetabit/visitor

Laravel visitor

568662.4k16](/packages/shetabit-visitor)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17861.9k3](/packages/stephenjude-filament-jetstream)[rainlab/user-plugin

User plugin for October CMS

11855.3k16](/packages/rainlab-user-plugin)[baserproject/basercms

baserCMS plugin for CakePHP

1942.1k](/packages/baserproject-basercms)[pumukit/pumukit

Media Portal

6014.8k56](/packages/pumukit-pumukit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
