1

Typically, I inject so many javascript in the website. But suddenly, the client told me that he can't render the website correctly, so I check it. I realize that he didn't enable javascript on his side.
So, my question is, should I need two places of source code? one is: index_with_js.php, and one is index.php, all files separate with js and non js version?
It is not a difficult job, but just make people insane to doing this. Any better suggestions?

1 Answer 1

5

Really, you should make your website degrade gracefully. Its not too difficult just involves changing the way you work a little bit.

I always build a website as if the user doesn't have JavaScript enabled to ensure its usable without it and I add my JavaScript afterwards. This way you don't have to worry about any complicated redevelopments.

I think you're likely to have to do a lot of work on this particular clients site as it sounds like its JavaScript heavy and since you can't detect whether JavaScript is enabled very easily (or at all?) You're going to have to make sure the website renders in a managable way then add your JS.

Sign up to request clarification or add additional context in comments.

1 Comment

+1 exactly what I was about to suggest. If your website isn't a JavaScript application, it should be able to work without JavaScript, it may not look as pretty, but it will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.