Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2009
    Location
    public_html/cgi-bin/
    Posts
    91
    Thanks
    14
    Thanked 1 Time in 1 Post

    Question Disabling page zoom

    Hey guys

    I'm working on a game (that's a website) and would like to know if it's possible to disable page zooming on a computer. The reason I ask is because if they can zoom out, they can cheat.

    Is there any code out there to stop it? I've seen some code for mobile browsers before.

    Regards
    Owen Ayres

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,640
    Thanks
    0
    Thanked 649 Times in 639 Posts
    No there isn't any way of preventing page zoom on a computer.

    Most operating systems have a magnify option built in so that those who have difficulty with small text can blow up a small section of the screen to many many times its original size regardless of what the specific applications that are being run do or don't allow with regard to zoom. There's also no way to block the zoom option within the browser. Combining both of these together would allow anyone to make somethinh hundreds of times its original size regardless of any attempt on the part of the author to prevent it.

    The only way to stop people being able to zoom is to not put it on a computer.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    Aug 2009
    Location
    public_html/cgi-bin/
    Posts
    91
    Thanks
    14
    Thanked 1 Time in 1 Post
    Thank you for the speedy reply felgall.
    I feared this was this case, I guess this will be a flaw in the game then

    Hey ho. Thanks again.

    Regards
    Owen Ayres

  • #4
    Regular Coder
    Join Date
    Aug 2011
    Location
    U.S.A.
    Posts
    233
    Thanks
    2
    Thanked 48 Times in 48 Posts
    or a nice hidden easter egg...it's all in how you spin it.
    WordPress Designer and theme developer. KlongDesigns - helping bloggers and non-technical folks claim their space on the internet.


  •  

    Posting Permissions

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