I am looking to add a page to a website, where a customer can enter their web site address, hit the button and it will tell them if their site is "responsive/mobile-friendly".
I just think it would be a cool feature.
I guess the only way is with Javascript though, as PHP would be MY server side.
Any ideas? I guess it could check for the @media in CSS, but not sure what else.
Is there a PHP (or JS) script that can detect responsive?
Moderator: General Moderators
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Is there a PHP (or JS) script that can detect responsive?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: Is there a PHP (or JS) script that can detect responsive
That's about the only thing that readily comes to mind, but it won't give you much. Having media queries shows they've tried, but not necessarily that they've succeeded. You could further check which breakpoints they've set and how many, but that's still scratching the surface.simonmlewis wrote:I guess it could check for the @media in CSS
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Is there a PHP (or JS) script that can detect responsive
Analysis will be difficult. Maybe it would be better to render images of the page in phone, tablet and desktop resolutions using the command line and a browser on the server. The show the images to the user.
(#10850)
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Is there a PHP (or JS) script that can detect responsive
Do you mean, make a "virtual browser", and show that in a DIV on the web page - if so, how???
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Is there a PHP (or JS) script that can detect responsive
Projects like this http://phantomjs.org/ and similar.
(#10850)