-1

So my website is getting a lot of traffic from PS3 browsers (says Google Analytics), I had my girlfriend test this out on her PS3 and the website looks horrible on a flatscreen tv and a smaller tv, this isn't the problem though, I'm looking for a way to detect the PS3 browser and put it into Javascirpt kinda like this:

if (ps3browser) {
/* Blahblahblah */
}

I know this is possible because Google Analytics does it and detects browsers:

enter image description here

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
insanewolfhd
  • 81
  • 1
  • 11
  • 1
    Possible duplicate of [redirect PS3 via user agent](http://stackoverflow.com/questions/6779631/redirect-ps3-via-user-agent) – jonrsharpe Dec 13 '15 at 19:22
  • 1
    You should really consider using some different CSS to make it more applicable to all kind of browsers, no matter what resolution they use. – Martin Braun Dec 13 '15 at 20:20
  • That's what I'm doing at the moment actually but thanks for the advice. It's just that the PS3 browser is depreciated and loads css and JavaScript weirdly sometimes, so I needed to make a workaround for that. – insanewolfhd Dec 13 '15 at 23:27

1 Answers1

2

PS3 browsers contain PLAYSTATION in their User-Agents, so you could check the agent of the browser and act on that.. something like :

var agent = navigator.userAgent;
if (agent.indexOf("PLAYSTATION") != -1)
  //PS3 browser
Hatted Rooster
  • 35,759
  • 6
  • 62
  • 122