Enter Agent from Joe Workman. Agent is a .php based stack that queries the device being used and only delivers the data that you've determined suitable for that device's browser, drastically improving performance on mobile devices.
Agent is accompanied by Agent URL, a stack that provides either/or options. Agent URL allows you to add optional content to your page that can be viewed when the user requires it. Product information, for instance, or location information, FAQs – or even language versions.
For example: You deliver an app that can be used under MacOS, IOS and Android. Agent can detect the device being used to view your page and display a download button for the app intended for said device.
Or you have a business that caters to English, German and French speaking clients. You can place buttons on your page with options to change the page language. The neat part is that the URL query is persistent. If your visitor sets German on one page, the German language versions of you pages will be loaded when he/she moves on to the next page and the language [/location/product] preferences will usually be remembered when your client returns to your site.
Not only does Agent query the device being used, but it can also be set to query the browser type, allowing differing elements to be displayed on a multitude of specific browsers, permitting you to display a message for users of IE, for instance, that certain elements on your page will not work as intended and to please install a decent browser.
Agent is straightforward, but you will need to spend a couple of seconds interpreting the logic. The first stack settings will help you test your logic – they are preview settings and allow you to set the Device, Platform and Browser for the RapidWeaver preview. The Agent Rules are simple too; Hide, Show, or Both.
Both? When you choose Both, Agent automatically adds a child stack with IF TRUE and ELSE settings. I.E. IF this page is viewed on mobile device, display stack one, ELSE display stack two.
The Device Rules give you the options Mobile, Tablet, Desktop and Bots. The activated buttons determine which devices your content will be displayed on – not to be confused with the visibility buttons in other stacks.
Agent's Details give you options for the Platform and the Browser being used to view your pages.
Agent URL is the stack that will allow you change your page content based on user preferences. Add the stack to your page and in the settings panel, you'll find Action – show and hide settings, Rule settings, Key, Value, a Set as default value checkbox, Persistence and Preview options.
Let's say you wish to add an option for a second language. Drop your default text into an Agent URL stack and add a Key such as 'lang' or 'sprache', then a Value, e.g. 'en'. Set the checkbox to Set as default value and activate 'Session'.
Now add a second Agent URL stack with your second language. Set the Key to 'lang' and the Value to 'de' (for German). Make sure that Set as default value is deactivated and activate 'Session' once more.
You will need a button with the URL value ?lang=de and one for ?lang=en to swap languages. This value is passed on to the browser when clicked and the language of your choice will be displayed. The Session setting ensures that the preferences are carried over to the next page that your user visits.
Check out Joe's instruction video for a more detailed description.
Agent is a game changer! It will streamline your website by delivering just the information required for each device/browser combination and will serve optional content.
Go forth and make those websites more efficient!
Links to the developers ® All trademarks cited on this page are the property of their respective owners.
Do you have a question regarding RapidWeaver?
Would you like help with your new project?
Would you like us to build your new RapidWeaver website?
Don’t miss a post!
Sign up for our monthly newsletter.
A monthly digest of all the latest updates from our RapidWeaver blog, keeping you up to date with the hottest new stacks and themes.
265 Moo 2
Mae Na Toeng Nai, Pai
Mae Hong Son
We design websites and print-products for small businesses at reasonable prices. We specialise in Responsive Web Design.
We do not harvest or sell personal information.
© rjh web design 2010—16