
Browser, device detect web server plugin?
I suspect like a lot of you, I have multiple client devices I wish to use with my control pages: iPod Touch, iPhone (retina resolution), Droid phone, iPad...
I have optimized my control pages for each of my devices and effectively replicated each control page set. At the moment, I have bookmarked the appropriate root page for each device so it can have the proper control pages that look best for it. But this seems silly.
I see two ways to solve this, there are probably more:
Server side Javascript:- Code: Select all
<script type="text/javascript">
if ((screen.width<=800) && (screen.height<=600)) {
window.location.replace('http://127.0.0.1/controlpage?name=highResCP&useJS=True);
}
else {
window.location.replace('http://127.0.0.1/controlpage?name=lowResCP&useJS=True');
}
</script>
Downside is going in to the appropriate file in /IndigoWebServer and hacking in the above code would only last until it gets written over the first time Matt and Jay push out an update.
Web Server PluginA plugin that would allow the user to define all parameters (screen resolution to target, control page to pull, etc). This seems far more elegant and what's more, would (I hope) survive through regular updates Matt and Jay do to Indigo itself.
Anyone have thoughts on this? Anyone wanna write a web plugin?
