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. An开发者_运维百科y better suggestions?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.
精彩评论