One thing you may want to consider is giving the user an option. Sometime the user doesn't want your mobile version even though they are mobile. I find sites all the time where I'm given a mobile website that doesn't work as well as the desktop version. Sometimes even when they give me the option of using the desktop version the first link I click throws me back into the mobile version. As a mobile user give me the option and follow my wishes as to how I want to use the site. If you want me to buy something from your site, the easiest way to push me to the competition is to force me into what you think is best.
Just my 2 cents as a mobile user. Sent from my iPhone On Dec 23, 2012, at 11:34 PM, The Dude <[email protected]> wrote: > > Claude and Kevin, you are gentlemen and scholars. It worked with virtually > negligible delay in the redirect. > > Its a workable solution for getting the screen vars and loading appropriate > size jpg images on that basis for mobile. Thank you for your input. > >>>> It seems there's no way to avoid the 2nd step either redirect or >> form post. >> >> The problem is not with using POST or GET, the problem is using Ajax. >> Ajax is good for many things, but not for this one. >> Just as you first attempt did, the Ajax call will be performed from >> client side, AFTER the templated is executed and the page read by the >> browser. >> You cannot do it without executing two steps, but wit redirection, the >> first step to get the values from the client is invisible for the user. >> >> >> Try my code, there are two steps, but you only see one. >> You can make a POST version of the same idea if >> 1. you do not like the idea of having parameters visible in the url, >> 2. you have other parameters to pass to the template. >> >> Try this code, same idea using a form for redirection: >> <CFIF NOT isDefined("session.screenWidth")> > >> <CFIF NOT isDefined("form.screenWidth")> > >> <FORM NAME="redirectForm" METHOD="POST"> > >> <INPUT TYPE="hidden" NAME="screenWidth" VALUE=""> > >> <INPUT TYPE="hidden" NAME="screenHeight" VALUE=""> > >> <!--- Add any other values here ---> > >> </FORM> > >> <SCRIPT> > >> document.redirectForm.screenWidth.value = screen.width; > >> document.redirectForm.screenHeight.value = screen.height; > >> document.redirectForm.action = window.location.href; > >> document.redirectForm.submit(); > >> </SCRIPT> > >> <CFELSE> > >> <CFSET session.screenWidth = form.screenWidth> > >> <CFSET session.screenheight = form.screenHeight> > >> </CFIF> >> </CFIF> >> >> <!--- perform the true task of the template here ---> >> <CFDUMP var="#session#"> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353663 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

