Pergunta

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

Foi útil?

Solução

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 em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top