homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

When to use strict mode?

5+ Year Member

Msg#: 4508050 posted 12:57 am on Oct 15, 2012 (gmt 0)

I know the benefits of using strict mode to test out the script, but should it only be used for testing?

It seems to benefit is finding errors. If there are some errors that slip by during testing, I would rather they silently fail and not take down the whole page.

Should I remove strict mode before putting the code live or do most people keep it in their code?



WebmasterWorld Senior Member 5+ Year Member

Msg#: 4508050 posted 2:19 am on Oct 16, 2012 (gmt 0)

A lot of what strict mode enforces is syntax and would be picked up in testing. No idea what most people do, probably never use strict mode at all.

I would leave it in, 'silently fail' means you have no idea what is happening, depending on nature of site that could be a bigger danger to you business.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved