Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: August 3, 2025, 1:00 am

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Websites that work on mobiles and desktops alike (Responsive)
#11
RE: Websites that work on mobiles and desktops alike (Responsive)
(February 17, 2018 at 10:11 am)FlatAssembler Wrote: Anyway, when do you think it's advisable to use server-side scripts instead of the client-side scripts?
Of course, sometimes you have to use server-side scripts to store the data (like when making the comment sections or a global high score list on a game), but when should you use server-side scripts to manipulate the data?
If you make an error in a client-side script trying to manipulate the data, the worst thing that can happen is that the browser crashes (which has actually happened to me a few times when using Safari or Internet Explorer). If you make an error in a server-side script, well, your website can easily become inaccessible.

JavaScript can be turned off. A not-insignificant number of people run their browsers with the NoScript plugin (or equivalent) in an attempt to block ads and malicious client scripts.

Regarding errors, program defensively. Exception handling is a thing that's built into just about every language I can think of. Never just blindly accept user input (especially if it's text or a file upload). Run unit tests as you write your code (which, I mean, I've mentioned several times now).

No one doing this for real just writes code and hopes it doesn't break. We take the extra time to account for both errors and malicious users. It's part of the development process.
Reply



Messages In This Thread
RE: Websites that work on mobiles and desktops alike (Responsive) - by KevinM1 - February 17, 2018 at 2:33 pm

Possibly Related Threads...
Thread Author Replies Views Last Post
  religious websites are a greater security risk than porn destinations. Ziploc Surprise 3 3170 June 20, 2012 at 6:57 pm
Last Post: Angrboda



Users browsing this thread: 1 Guest(s)