Giter Club home page Giter Club logo

varnishua's Introduction

varnishua

Joomla plugin detects device from Varnish or PHP

The idea is to flip between Desktop, Tablet and Mobile devices and using the overrides of joomla set the content that the user will see on his/her browser depending on the device.

The set up with Varnish is extremely efficient as the request comming from the user immidiately proccesed and a value X_UA_DEVICE is stored in the header that is passed to PHP and Joomla!. Joomla then running this plugin gets the value and stores it in the users session. By the way this plugin takes care of the nasty cookie problem that prevents Joomla co-exists with Varnish. Once the session got the info we just check with a simple case or if/else in the module and we set the data that joomla will render.

Its not fully tested, but so far no nasty bugs.

Of course if you don't have Varnish (that's a dedicated server) you can use plain PHP. The code for that comes from Rene Kreijveld @ https://github.com/renekreijveld/UserAgentDetector

varnishua's People

Contributors

dgrammatiko avatar

Stargazers

Elvis Sedic avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.