Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

To Javascript, or not to Javascript?

Featured Replies

When I create static websites, I use jQuery for a bit of flare. But when I write Web Apps, like my admin panel I'm creating for dynamic sites I build, jQuery is used for more than a bit of flare.

 

I like to use a back up plan in case the user has JavaScript disabled. However, what is the general opinion with JavaScript. Do you build a site that if the user has this disabled then they can not use the site or just that they have limited functionality. Or are you the person like me where you worry about everything working with or without JavaScript?

 

Creating this admin panel relies on JavaScript a fair bit & I have but a <NOSCRIPT> tag in place that when they open the page it tells them JavaScript must be activated. -- Is this arrogant programming? Or should I cater for people who have JavaScript disabled?

As always, it depends who you are expecting to visit the website. If it's a site to impress your friends who all have javascript enabled, just use javascript and don't worry about having alternatives.

 

If you are designing a business site you have to assume that some users will have javasript disabled, so don't use javascript for the dynamic and important bits of the page like a menu unless there is a clear alternative. Or just use it for extra visual effect.

As a rule of thumb, design without Javascript first to ensure full functionality (rearranging widgets like the Wordpress dashboard or submitting data without a page refresh counts as enhancement rather than actual functionality) then layer on the JS. You'll write better apps for it.

 

The role of JS is to enhance the experience, not provide functionality.

  • Author

These were my general thoughts.

 

I usually design by HTML/PHP - to - CSS - to - JS. I find the order works well. I just need to stick to that & stop listening to other people.

 

Cheers guys.

 

Liking this website.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.