All-in-one creative subscription with full AI stack All-in-one creative subscription From $16.50/m

This is a public service announcement. element.textContent and document.createTextNode are dangerous DOM methods. They can easily lead to XSS vulnerabilities in your application. We’ll find out how by looking at two common – but flawed – applications of these methods: stripping and escaping HTML. Stripping tags with element.textContent What does element.textContent do? (element.innerText in old IE
Semantic templatesHandlebars provides the power necessary to let you build semantic templates effectively with no frustration. Mustache-compatibleHandlebars is largely compatible with Mustache templates. In most cases it is possible to swap out Mustache with Handlebars and continue using your current templates. Fast executionHandlebars compiles templates into JavaScript functions. This makes the t
Response is an experimental jQuery plugin for building websites with responsive content. It can dynamically swap content based on breakpoints and data attributes. Breakpoint Sets Response's most powerful feature is breakpoint sets. Using the sets, content for more-capable devices and/or larger viewports can be stored in HTML5 data attributes. Designers can create custom sets to make exactly the fu
画面をダブルクリックで縦書きと横書きを切り替えることができます。要素を指定して縦書きにしている場合は、次回アクセス時に同じ表示が引き継がれます。 どんなサイトでも縦書きにするブックマークレット。 ↓右クリックで「お気に入り」に保存するか、リンクをドラッグしてブックマークバーにドロップします。 「縦書きにする・iPhone 用リンク」 「縦書き可能にする・iPhone 用リンク」 「段組み縦書き可能にする・iPhone 用リンク」 iPhone に登録するには? とりあえずこのページを共有ボタンからブックマーク。 iPhone 用リンク を長押ししてコピー。 ブックマークを開いて、追加したブックマークを「編集」。 名前を「縦書き可能にする」などに変更し、URL 欄に上記コードをペースト。 最初の「http://」を削除。 注意! やや動作が重いです! うまく変換できなかったときは、画面をダブ
JavaScriptを最適化する CoffeeScriptをJavaScriptにコンパイルしたら、本番環境のサーバに配置する前に最適化を行っておくとよいでしょう。ここでいう最適化とは、空白などの不要な部分を取り除いたり、変数名を短い名前に置き換えてファイルサイズを減らす処理をいいます。最適化をすると、ソースコードの挙動を全く変えずにファイルサイズを減らすことができます。 UglifyJS(BSDライセンス)という最適化ツールは、YUI Compressor(Yahoo!が開発したJavaScript最適化ツール)やGoogle Closure Compiler(Googleが開発したJavaScript最適化ツール)などの他の最適化ツールと比べて実行速度と圧縮効率の面で非常にバランスがよく取れています。YUI Compressorと比べた場合、UglifyJSの方が圧縮効率は大幅に良く、
Get affordable and hassle-free WordPress hosting plans with Cloudways — start your free trial today. The following is a guest post Nick Williams. Nick emailed me about a new library he created to assist in working with responsive design. Specifically, he was implementing an idea he found here on CSS-Tricks but wanted to do so more intelligently by only running the script when needed. Thus the birt
The original breakout article on responsive web design came out in early 2010 (well, maybe it wasn't the first article, but it was certainly the one that moved responsive design firmly onto all our radars). Since then, responsive design has rocketed from a parlor trick only found on edgy portfolio sites to an accepted practice, finding its way into large-scale sites. For a sample of the breadth, v
Test JavaScript code in a real browser with QUnit. Getting started QUnit releases are standalone and require no runtime dependencies for use in the browser. To get started, all you need is an HTML file that loads two files: qunit.js and qunit.css. <!DOCTYPE html> <html> <meta charset="utf-8"> <title>QUnit</title> <link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.24.1.css"> <body>
Update Oct 2013: for a more bulletproof version, tested in the wild, IE and all, check Philip's snippet at http://www.lognormal.com/blog/2012/12/12/the-script-loader-pattern/ Asynchronous JS is cool but it still blocks window.onload event (except in IE before 10). That's rarely a problem, because window.onload is increasingly less important, but still... At my Velocity conference talk today Philip
さてさて、第三弾です。 今回はMongoDBを利用して、メッセージの永続化にまで挑戦してみました。 Yosuke Chat test MongoDB自体の勉強から入ったのですが、MongoDBはすごく簡単で良いですね。 特にNode.jsとの相性が良いです。ライブラリも豊富ですし、割とドキュメントも揃っています。 今回はherokuのaddonであるmongoHQを利用します。 まずはadd-onを実行するための下記のコマンド実行してください。 $ heroku addons:add mongohq:freeこれであなたのherokuアプリケーションから利用できるようになります。 ※add-onを有効にするためには、herokuのユーザー検証が必要になります。 ユーザー検証にはクレジットカード番号等も必要になりますが、100MBの範囲で利用する分には無料です。 Node.jsとmongoD
Don't let tables break your responsive layout anymore. This simple JS/CSS combo will let your tables adapt to small device screens without everything going to hell. Why We Built This When we looked around at the various implementations of responsive tables on the web, we saw lots of interesting ideas but nothing we thought was a really great implementation. Chris Coyier on css-tricks.net did a gre
ちょうど金環日食の時だけ曇り空だったminamiです。皆さんはちゃんと見られましたか? Webサイトでベクターデータを扱うのにとっても強力なRaphael.jsというライブラリがあります。何年か前からあるのですが、なぜか最近興味が出てきたので勉強できるサイトを調べました。 Rapahel.jsはJavaScript用のグラフィックライブラリで、比較的簡単な記述でSVGで扱うことができます。SVG非対応のIEの場合はVMLで表示してくれるのがミソで、IE6であっても同じ見た目を確保することができます!また、マウスイベントに関連付けたアニメーションも作ることができます。 ライブラリ自体は多少容量が重いのですが、他のライブラリに依存していないのでこれ単体で済んでしまうというのも強みではないでしょうか。ちょっといじっただけで値によって変化するグラフなんかも描くことができます。 棒グラフのサンプル
Ever find yourself needing to wipe your iPhone 15 Pro Max clean? Maybe you’re planning to sell it, following an iPhone guide at i5apps.com, or perhaps it’s just time for a fresh start. Whatever your reason, performing a factory reset is a straightforward process. By the end of this quick overview, you’ll know exactly how to restore your iPhone 15 Pro Max to its original factory settings. After you
通常、Socket.ioのクライアントスクリプトは、起動しているサーバー側のURLから「/socket.io/socket.io.js」の様に取得するのだが、どうもこれがMinifyされていない。HTTPヘッダーに「Cache-Control」もついてないし、gzip圧縮転送もされていない。 本番運用向けのクライアントスクリプトに対する設定をしましょう。 Socket.ioのソースコードを眺める lib/manager.jsを見る限りだと、 , 'browser client': true , 'browser client cache': true , 'browser client minification': false となっている。「browser client minification」をtrueにしてあげれば良いのだろう。 Manager.prototype.enable =
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く