Clicky

Agent – Streamlined Content Delivery
My Image

All the latest RapidWeaver Stacks reviewed,
plus the most important community news …

Stay up to date with current RapidWeaver developments

Agent – Streamlined Content Delivery

If you've used RapidWeaver for any length of time, you will at some point have added some sort of visibility stack to display/hide information on certain devices. Stack elements, for instance, that are too large to display on a mobile screen, or elements that just won't display well with IE.
Visibility stacks have been around for years and offer options like breakpoints and even browser detection. These visibility stacks, however, all have one thing in common: the hidden content is removed from view, but it is still downloaded to the browser, using up valuable bandwidth and slowing down page load times.

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.

Agent
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!

blog comments powered by Disqus

Links to the developers ® All trademarks cited on this page are the property of their respective owners.

Subscribe to Ninja News
or ask a question

Hi, I’m the Ninja Bot. What’s your name?
image/svg+xml
Nice to meet you, [1-1]. Could you tell me your mail address?
image/svg+xml
[1-1], would you like to subscribe to the monthly Ninja Newsletter?

Yes, I would like to receive your monthly newsletter.

No thanks, I’m good for now. I have a different issue.

image/svg+xml
Thanks for your support, [1-1]. Is there anything else I can do for you?
image/svg+xml

[1-1], thanks for subscribing. If you made a further request, I’ll get back to you – typically within 24 hrs.

image/svg+xml
Name: [1-1] [1-2]
Email; [2]

Contacted you via the Siphon form at Ninja News.

I would like to subscribe to the Ninja Newsletter

Message

[4]
I’m sorry tohear that, [1-1]. How may I help you then today?
image/svg+xml

[1-1], thanks for contacting me. I’ll review your mail, and get back to you – typically within 24 hrs.

image/svg+xml
Name: [1-1] [1-2]
Email; [2]

Contacted you via the Siphon form at Ninja News.

I don’t want to subscribe to the Ninja Newsletter right now.

Message

[6]

Thanks again for contacting us. Your request was successfully submitted.

Contact Information

rjh logo

rjh web design

265 Moo 2
Mae Na Toeng Nai, Pai
Mae Hong Son
Thailand 58130

About Us

We design websites and print-products for small businesses at reasonable prices. We specialise in Responsive Web Design.

Legal

This site uses Cookies to determine the best method of display in combination with your browser.
We do not harvest or sell personal information.
© rjh web design 2010—17

Powered by rjh-design

This website was built with loving care on a Mac using Foundation. For more information, contact me.

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.

View previous campaigns.

Subscribe to the Ninja Newsletter

* indicates required