Pregunta

I need to display different messages for desktop and mobile web sites when JavaScript is disabled.

Currently I have

<noscript>  
    <meta http-equiv="Refresh" content="0; URL=/error.html" />
</noscript>

and i need code that would do (i use pseudocode)

<noscript>
    if desktop
    <meta http-equiv="Refresh" content="0; URL=/error.html" />
    if mobile
    <meta http-equiv="Refresh" content="0; URL=/mobile-error.html" />
</noscript>

Thanks

¿Fue útil?

Solución

Is there any server backend to your website? You could try and do mobile browser detection based off of the user-agent received from the connecting browser.

See this stackoverflow post about using the user agent to detect mobile.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top