Page 1 of 1
Is there a PHP (or JS) script that can detect responsive?
Posted: Tue Dec 15, 2015 11:28 am
by simonmlewis
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.
Re: Is there a PHP (or JS) script that can detect responsive
Posted: Tue Dec 15, 2015 11:32 am
by Celauran
simonmlewis wrote:I guess it could check for the @media in CSS
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.
Re: Is there a PHP (or JS) script that can detect responsive
Posted: Tue Dec 15, 2015 12:02 pm
by Christopher
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.
Re: Is there a PHP (or JS) script that can detect responsive
Posted: Tue Dec 15, 2015 12:25 pm
by simonmlewis
Do you mean, make a "virtual browser", and show that in a DIV on the web page - if so, how???
Re: Is there a PHP (or JS) script that can detect responsive
Posted: Tue Dec 15, 2015 1:35 pm
by Christopher
Projects like this
http://phantomjs.org/ and similar.