Today I Learned - Rocky Kev

TIL Stop users from copying input

POSTED ON:

TAGS:

I noticed I couldn't copy my credit card number within a bank form.

Their solution was pretty interesting.

Notice these?

oncopy="return false"
onpaste="return false"

Pretty interesting.

This is similar to the HTML onclick, where you can tie a function to it.

MDN
reference


Related TILs

Tagged:

TIL Content sectioning

Content sectioning or landmarks, like sidebar, content, footer. You know, like better names.

TIL php-fpm

PHP runs as a separated service when using PHP-FPM. By using this PHP version as language interpreter, requests are processed through a TCP/IP socket; so that the Nginx web server only handles the HTTP requests and PHP-FPM interprets the PHP code. The fact of having two separate services is key for increasing efficiency.

TIL Considering Device Obsolescence with web development

I'm incredibly guilty of pushing to build for the latest tech. For good reason too - you can write less code, use more native functions, and things are just more likely to work.