Comments (4)
We run a large-ish ecommerce store and we use varnish devicedetect for millions of requests per month. We're able to serve the full request (include a devicedetect call) from varnish in as little as 1e-4 ie. less than a millisecond
i guess this is in part due to pcre jit which should be enabled by default in most varnish installs
from varnish-devicedetect.
@quintonparker
Wow, thank you for the prompt response!
So in your option, using this script to detect a device will not take 125ms, in fact, in your experience it should take less than 1ms!? This is awesome, I must try it and although I will close this issue, I will update it with any benchmarks I get from my app with mobile detect in place.
Cheers!
from varnish-devicedetect.
You're welcome. You can even apply an optimisation on top of that by instructing browsers/agents to save the result as a cookie and so you can bypass the device detection and use the value from the cookie instead
from varnish-devicedetect.
@quintonparker
By the way, I just realized that to benchmark it, I do not have to change my application code. I just installed it on varnish and checked if its working by manipulating the browser agent in Chrome console. After confirming that it was working, I compared the load times before and after installation. Your 1ms (at worst) seems spot on!
To integrate this, I must however, change alot in my app but make no mistake, it already seems totally worth it! Thanks.
from varnish-devicedetect.
Related Issues (17)
- WURFL and Varnish Cache HOT 1
- FirefoxOS detection HOT 4
- Licence? HOT 2
- Why 'pc' type instead of the usual 'desktop' one? HOT 2
- Facebook's iPad in-app browser is detected as mobile I/o tablet HOT 2
- [regex] detection logic based on Mobile_Detect.json HOT 8
- iOS User-Agent used in OS process retrieving icons for “Add To Home Screen” not recognized as a mobile device. HOT 6
- Need to differentiate between mobile bot and desktop bot HOT 3
- Tablet PC in varnish-device detect HOT 2
- Google Mobile bot HOT 5
- Microsoft Surface handling HOT 2
- new google mobile-bot HOT 5
- Wrong X-UA-Device HOT 6
- Add more User-Agents HOT 9
- `Set-Cookie: ..SameSite=None` on supported browser HOT 1
- If there is a remote backend, the front server cache nothing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from varnish-devicedetect.