I am working on a project that by default loads content via AJAX.
I want it to check if the user (or SE bot) has JS disabled, and if so display the content statically via PHP.
Is there a way to do this? I don't think noscript tag would work here, as the page would be empty to the non JS users or bots.
Also doing a redirect to a different page it doesn't make sense to me, as the links to the original page will not be taken into consideration by search engines and will not be able to index that page as they will be redirected.
There isn't really a way to automatically change to a different page when the user DOESN'T have JavaScript.
What I'd do is to display the non-JS version as default but hava a script on each page that redirects to the AJAX version and sets a cookie so that from then on all pages display the AJAX version right away. Oh, and better keep a noscript tag with a link to the non-AJAX version around in case anything goes wrong, such as someone who already has the cookie disabling JavaScript.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With