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 today

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 43% 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

3148d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/63505c460ac77c445f9bfcea80744d8c499ad839f94e69690a1f5a858a159e33?d=identicon)[derek9gag](/maintainers/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

[jenssegers/agent

Desktop/mobile user agent parser with support for Laravel, based on Mobiledetect

4.8k67.8M440](/packages/jenssegers-agent)[hisorange/browser-detect

Browser &amp; Mobile detection package for Laravel.

1.1k10.1M50](/packages/hisorange-browser-detect)[shetabit/visitor

Laravel visitor

565578.2k8](/packages/shetabit-visitor)[suncat/mobile-detect-bundle

Symfony2/3/4 bundle for detect mobile devices, managing mobile view types, redirect to mobile version.

4035.3M7](/packages/suncat-mobile-detect-bundle)[ziming/laravel-email-sniper-link

Laravel package to generate email sniper links based on given email

1519.9k](/packages/ziming-laravel-email-sniper-link)[superbig/craft3-mobiledetect

Use Mobile\_Detect for detecting mobile devices (including tablets)

1953.3k](/packages/superbig-craft3-mobiledetect)

PHPackages © 2026

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