Results 1 to 10 of 10

Thread: What you CANNOT do with JavaScript

  1. #1
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default What you CANNOT do with JavaScript

    Please don't post questions in this thread.


    What you cannot do with JavaScript

    1. You cannot disable certain features of the browser (eg. Print, Copy etc.)
    2. Disable right-click effectively
    3. Stop people from accessing your page with JavaScript alone
    4. Make people not steal your work.
    5. Protect your images.
    6. Manipulate the browser
    7. Hide menus
    8. Disable certain options of the browser

    Don't bother asking about this, we might not answer it.

    If anyone wants to add anything else here, feel free to do so.
    Last edited by tech_support; 11-17-2007 at 05:53 AM.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Also; you can't read, write, or delete files off the server nor the client's computer. Something else that Javascript can't do is interact with the server (unless you utilize AJAX or similar).
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Jul 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Another thing you can't do is refresh an iframe on a different domain.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    You can't send emails with javascript
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    And, better yet, there are some things you can do with JavaScript that you probably shouldn't.
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  6. #6
    Join Date
    Aug 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    To the end of 3. Stop people from accessing your page with JavaScript alone
    add Use .htaccess or CGI instead
    that'll stop them from asking what to use instead

  7. #7
    Join Date
    Apr 2007
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    1. Javascript cannot access the local file system. You cant read or write files on the user’s computer - its a security feature to prevent sites doing anything they like on your computer (like leave a virus…)
    2. Javascript cannot access the remote file system either! It used to be the accepted knowledge that you couldn't even access files hosted on the server…things have changed slightly with the wide-spread support for XMLHttpRequest, but you've still only got HTTP to play with - you cant move files around, rename them, change permissions or anything like that on the server using only Javascript.
    3. Javascript cannot run any application outside the browser. Just like with point 1, this is a security feature to prevent a website doing as it pleases.
    4. Javascript cannot access your printer/scanner/webcam. Javascript has no direct access to your peripherals without relying on 3rd party tools etc.
    5. Javascript cannot change the URL displayed by the browser. Again this is for security reasons, otherwise any old site could simply change the displayed URL to look like your Bank’s or PayPal’s etc secure site to trick you into entering your details.
    6. Javascript cannot change the browser history. For example, you cannot control which page appears if the user clicked on the “back” button in their browser.
    7. Javascript cannot access your database. If you've got a MySQL or SQL Server database on your server, you cannot use Javascript to access it directly - you'll need to use a server-side language (e.g. PHP, ASP etc) for that.
    8. Javascript cannot “encrypt” your HTML or prevent "image theft". It is pathetically easy to circumvent so-called Javascript “security” features, so its not even worth trying. If a user can see your page, they can steal it!
    9. Javascript cannot control the user’s mouse or keyboard. Sorry but Javascript wont let you "hijack" a user’s mouse and move it to click on your site’s adverts to make you money!
    10. Javascript cannot use multiple threads. There are some moves afoot to try and create some sort of library to accomplish this, but for now the advice is don’t worry about optimizing your Javascript for multiple core CPUs!
    Last edited by jscheuer1; 03-02-2008 at 05:34 PM. Reason: Format as numbered list

  8. #8
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    JavaScript cannot:
    Send emails
    Add toolbars
    Install Firefox
    protect content
    bounce hackers
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  9. #9
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    I already said protect content and djr33 already said about sending e-mails...
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,004
    Thanks
    44
    Thanked 3,203 Times in 3,165 Posts
    Blog Entries
    12

    Default

    What you cannot do with javascript:

    • Anything permanent
    • Anything that is mission critical
    • Anything secure


    Please accept my apologies if I have duplicated any previous entries in this thread.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •