Redirecting… Click here if you are not redirected.
11:10~ 課題ページの確認&PageSpeed Insightsの実行目的:チューニング対象のウェブサイトの改善の余地を調査 上記のgruntプラグインをインストールする npm install コマンドを実行しながら、ブラウザやIDEでチューニング対象のウェブサイトを確認し始めました。 少し見ただけでもCSSの構文エラーがあったり、使っていないJavaScriptライブラリがインポートされていたり…。 まるで無茶な運用を数ヶ月続けたかのような、カオスなファイル群でした。 ここで実行した PageSpeed Insights に画像サイズの最適化をオススメされたので、まずはそこから行うことにしました。 11:20~ 画像ファイルの最適化目的:画像ファイルサイズの削減 30 x 30pxで表示している画像ファイルが実際には150 x 150pxで保存されていたりする画像がそこそこあったの
以下のコードがベース var interval = setInterval(function () { // 前提条件 if (!$('body').length) { return; } // 実行コード alert('ready!'); // 監視停止 clearInterval(interval); }, 100); このコードの問題点 「コード実行時に前提条件が満たされてても必ず100ms待ってしまう」 改善 var interval = setInterval((function () { // 前提条件 if (!$('body').length) { return arguments.callee; } // 実行コード alert('ready!'); // 監視停止 if (interval) { clearInterval(interval); } })(), 100)
Image Comparison Slider A handy draggable slider to quickly compare 2 images, powered by CSS3 and jQuery. When you create a product page, there are some effective UX solutions that can be used to make the user 'feel' the product. A comparison image slider is one of those. If you look at the Sony Ultra HD TV product page, they use this approach to emphasize the difference between their display res
About HTML Preprocessors HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug. Learn more · Versions Adding Classes In CodePen, whatever you write in the HTML editor is what goes within the <body> tags in a basic HTML5 template. So you don't have access to higher-
ものすごく遅レスですが、LLDiver で @esehara さんの LT であった話。 forやめろ、あるいは「繰り返し」という呪縛から逃れるために 簡単に言うと、 1~10 までを出力する方法を複数考えるというもの。 for, while, 再帰, goto etc.. と出て、途中で終わっちゃったので結論はよくわかりませんでしたが、 Node ではどれも使わずにできるな、と思ったのでちょっと例を出してみます。 ちなみに、タイトルでネタバレしている通りイベントループの話です。 そしてよくある「イベントループとは何か」「なぜ止めてはいけないのか」「process.nextTick() とは何か」「setImmediate() と何が違うのか」 などを解説する良い例だったので、書いてるうちに実はそっちがメインの解説となりました。 サンプルの実行結果は Node v0.11.13 です。(書
September 9, 2014 JavaScript hacks explained There are several JavaScript tricks that are used widely by experienced programmers. Many of them may not be instantly obvious, especially for beginners. These tricks use language features not by their direct purpose, but rather by their side-effect to achieve goals, that can’t be achieved by default language means. Here I made a little compilation of s
Author: Ed Merritt Date: 22 August 2014 Category: Interface Design, Development, Mobile Reading Time: Media queries make a website respond to the viewport. But what if we could make site components respond to their container? I’ve been having a play with the idea of determining the context of a piece of content within a page rather than simply querying the media (device) itself. Media queries intr
September 11, 2014Introducing the Screen Orientation API Everyone uses the web in a different way. There are people who use it to chat, others use it to watch movies, and others use it to play games. For those of you who access the internet to play games on their mobile device, I have a question: have you ever played a game that asks you to rotate the screen to start? I bet the answer is yes. The
What is Polyfill.io? It's a service which accepts a request for a set of browser features and returns only the polyfills that are needed by the requesting browser. Why do I need it? There are lots of differing browsers and browser versions in use throughout the world, each one has a slightly different set of features to the rest. This can make developing for browsers a difficult task. The latest v
この手の話題は記事タイトルが本当につけにくいw 今回も備忘メモです。 for(var i = 0; i < 3; i++) { setTimeout(function(){ console.log(i); }); } このコード、実行するとどうなるでしょう? こうなる for(var i = 0; i < 3; i++) { setTimeout(function(){ console.log(i); }); // 3 が3回 } 思ってたのとちがう! こうすればOK for(var i = 0; i < 3; i++) { (function(local){ // とじこめる setTimeout(function(){ console.log(local); }); }(i)); // とじこめる! } すごーくざっくりした理解ですが、 JavaScriptはシングルスレッド setT
HTML5とWebGL 初めにHTML5の位置づけについて簡単に触れます。HTML5とはこれまでのWebページ作成言語で主流だったHTML4やXHTMLの後継言語のことで、 2008年に草案がまとめられ、2014年までにウェブブラウザ各社への正式勧告を目指して策定が進められています。 HTML5は 2012年1月でもまだ「草案」段階で、仕様も流動的な準備段階であるが、開発側からもユーザ側からも非常に注目が集められています。 その大きな理由の一つに挙げられているのが、iPhoneやAndroidなどのスマートフォンの台頭による情報端末の多様化への対応のためです。つまり、様々なWEBコンテンツのクロスプラットフォーム化への重要な貢献が期待されているからです。 というのもスマートフォンの登場までは、Adobe社が提供する FLASH が動画やオーディオなどが組み合わされたマルチメディアコンテンツ
最近こういうことよくやらなきゃなのでまとめました。 以下のリンクにある動画とスライドのまとめみたいなものです! 自分用なので、細かいことは書いてませんが。 参考:Memory Management Masterclass with Addy Osmani - YouTube 参考:JavaScript Memory Management Masterclass // Speaker Deck 動画のがわかりやすいので、時間のある人はぜひぜひ。 0. はじめに パフォーマンスチェックには、DevToolsのTimelineとProfileが便利 Chromeのタスクマネージャでもメモリの使用量とかはわかるけど、DevTools使ったほうがわかりやすいし使うべき 1. DevToolsを使ったDEMO Sawtooth Curve DevToolsのTimelineで、所謂ノコギリ型にメモリの
dc.js is a javascript charting library with native crossfilter support, allowing highly efficient exploration on large multi-dimensional datasets (inspired by crossfilter's demo). It leverages d3 to render charts in CSS-friendly SVG format. Charts rendered using dc.js are data driven and reactive and therefore provide instant feedback to user interaction. dc.js is an easy yet powerful javascript l
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く