So I'm working on the mobile version of a site I'm doing, and
so far, I'm pulling the mobile sites content from its main counterpart, the main site.
As I study some mobile sites out there, I notice a lot of em have a "view full site" link.
Now I plan on redirecting the mobile visitors via .js in the header tag on main site via a check for screen width etc...(not sure if its the best way but so far the easiest on my brain))(but suggestions also welcome)
but something like this
if (screen.width<=XyZ||screen.height<=XyZ) //example iphone size lets say 320x480
window.location.replace("mobile site link here.")
Again I dont know if this is the best way but, on dummy tests, it works on iPhone, some friends Droids, and one Blackberry. But it works.
Anyways, so my question is, if i do this check on every page...how can I possible have a "view full site" option?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…