Fionna Chan
1 min readMay 15, 2018

--

Hi Andy, it depends on the use case. If you are saving something from a user input field, use the content from the input field to inject with innerHTML and do a GET request through submitting the data from the input field to a server, it is NOT recommended because your site will be vulnerable to XSS attacks. (Google for more info) In the demo code on this article it is fine.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Fionna Chan
Fionna Chan

Written by Fionna Chan

Frontend Unicorn. I 💖 CSS & JavaScript. My brain occasionally runs out of memory so I need to pen down my thoughts. ✨💻🦄🌈.y.at

No responses yet

Write a response