Hi guys
I'm feeling exuberant
I want to redo my portfolio when I get chance and not just leave it for when I need it badly
I'd like to have a supreme website that detects what platform you are viewing it on and loads a different, optimised version depending on it. Basically thinking about people who use iphones and less importantly, PSP (this is more for my own pleasure)
I know it's incredibly unlikely that people will seriously view portfolios on handhelds but its just something I'm looking in to. I am not looking for a change in job at all!
anyone got any leads on this that I can look in to, or better yet, anyone done it before?
Replies
<script language=javascript>
<!
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
{
location.replace("indexiphone.html");
}
>
</script>
I'd be tempted to not use a different html page, just a different style sheet.
for PSP I *think* it's just:
if((navigator.userAgent.match(/PSP))
but I'm sure some web searching could verify the correct agent
Edit: A quick search on Google turned up a CSS doc for the PSP: http://www.brothercake.com/site/resources/reference/psp/
He detects the PSP and makes it use PSP specific CSS, this would be ideal method.