Meta tags:
Headings (most frequently used words):
this, like, not, blog, safe, json, in, script, tags, how, to, break, site, just, do, these, types, are, the, same, volta, vs, nvm, for, javascript, tooling,
Text of the page (most frequently used words):
the (13), and (8), #script (8), this (7), volta (7), like (6), for (6), types (6), union (5), json (5), with (4), more (4), nvm (4), two (4), that (4), interface (4), tags (4), loading (3), why (3), use (3), are (3), type (3), user (3), isloggedin (3), escape (3), wordpress (2), explain (2), these (2), work (2), javascript (2), node (2), replace (2), have (2), sessiondataunion (2), data (2), don (2), sessiondatamega (2), string (2), name (2), typescript (2), often (2), preferable (2), can (2), ways (2), not (2), same (2), parsing (2), rules (2), how (2), x3c (2), safe (2), break (2), sirre (2), designed, 2021, has, better, handling, global, scripts, installs, uses, project, defined, tools, automatically, differences, between, excited, about, benefits, stem, from, enhancements, several, projects, managing, versions, recently, started, using, been, very, impressed, version, manager, tooling, 2023, consists, members, both, specific, than, narrower, flexible, enough, cover, all, different, shapes, expect, some, wider, true, never, false, boolean, when, working, design, our, important, one, choice, see, define, but, many, times, single, here, used, similar, below, 2025, post, will, dive, deep, into, exotic, tag, order, understand, they, appropriate, way, easiest, safest, always, ascii, case, insensitive, match, x3cscript, you, take, word, html, standard, recommends, escaping, flags, wp_json_encode, php, json_encode, json_hex_tag, json_unescaped_slashes, strings, u003c, just, follow, unintuitive, webpage, surprising, fortunately, relatively, straightforward, site, blog, skip, content,
Text of the page (random words):
sirre al skip to content sirre al blog safe json in script tags how not to break a site script tags follow unintuitive parsing rules that can break a webpage in surprising ways fortunately it s relatively straightforward to escape json for script tags just do this replace with u003c in json strings in php use json_encode data json_hex_tag json_unescaped_slashes for safe json in script tags in wordpress use wp_json_encode with the same flags you don t have to take my word for it the html standard recommends this type of escaping the easiest and safest is to always escape an ascii case insensitive match for as x3c script as x3cscript and script as x3c script this post will dive deep into the exotic script tag parsing rules in order to understand how they work and why this is the appropriate way to escape json more like this like loading 2025 08 06 these types are not the same when working with typescript types the design of our types is important one choice we often see is to define an interface but many times a union is preferable to a single interface here are two types that can be used in similar ways below i ll explain why the union is often preferable typescript interface sessiondatamega isloggedin boolean user name string type sessiondataunion isloggedin false user never isloggedin true user name string sessiondatamega is a wider type it s flexible enough to cover all the different shapes of data we expect and some we don t sessiondataunion is a union of two narrower types the union consists of two types members of the union that are both more specific than the interface more like this like loading 2023 09 06 volta vs nvm for javascript tooling i work on several javascript projects that use nvm node version manager for managing node js versions i ve recently started using volta to replace nvm and have been very impressed i ll explain the differences between volta and nvm and why i m excited about volta volta s benefits stem from these two enhancements volta installs and uses project defined tools automatically volta has better handling of global scripts more like this like loading 2021 02 12 designed with wordpress d
|