I am a web developer. Tech-wise, I focus on high-performance UI programming and web accessibility. I used to do UX but I hated it and stay firmly on the execution side of the fence these days.

Apr
1
answered How to find a property within nested array and return its location
Apr
1
revised Can I "pre-load" an image with JS to be used as a CSS background-image?
added 9 characters in body
Apr
1
comment Can I "pre-load" an image with JS to be used as a CSS background-image?
@Pumbaa80 - I believe you'll still have the problem of the user seeing a 'loading spinner' on the browser for longer than they need to.
Apr
1
comment Can I "pre-load" an image with JS to be used as a CSS background-image?
@SomeKittensUx2666 - I'm not the downvoter, but at a guess: 1) Doing this procedurally is, if executed correctly, much more maintainable. The use case is dynamic content so we don't need to worry about relying on JS, and 2) large images added this way will delay the firing of the onload event.
Apr
1
comment Can I "pre-load" an image with JS to be used as a CSS background-image?
Honestly, I believe that this is a much better strategy. It allows you to use JS to programmatically tie together images that need preloading and their addition to the DOM. Adding images manually every time they're needed could become a maintenance hell quite quickly.
Apr
1
comment Can I "pre-load" an image with JS to be used as a CSS background-image?
@Phaedra - no, not unless there's some headings on the response (eg pragma-directives) that tell the UA not to bother caching.
Apr
1
answered Can I "pre-load" an image with JS to be used as a CSS background-image?
Apr
1
comment Can I "pre-load" an image with JS to be used as a CSS background-image?
@FranciscoPresencia - images added to the page this way will delay window.onLoad, yes
Apr
1
comment Can I "pre-load" an image with JS to be used as a CSS background-image?
@jt0dd - you can also set a background image on an element and give it a background position / display properties such that it won't render.
Mar
27
comment Tight Coupling Between Javascript, HTML, and CSS: A More Modern Approach?
@zzzzBov - I know it's a microoptimization, but ID and class lookups are a lot faster than data-attribute lookups. But yes, I like the idea of using different sets of attributes to handle different concerns.
Mar
27
comment Select of a section of a web page and output all js used there?
@MattyPantaloons - it doesn't really work that way. You could have lots of functions that will help do stuff around a particular piece of content, and call lots of other functions to do that work. Especially if it's an SPA under somethink like Angular; the dependency tree in terms of functions will be huge. The content could be grabbed by XHR too. You could use the above technique to reverse the basic implementation of key features, but you're probably going to be writing your own implementation rather than just copying a few lines of JS. And the reversing will not be just a few minutes' work.
Mar
27
answered Tight Coupling Between Javascript, HTML, and CSS: A More Modern Approach?
Mar
27
awarded Editor
Mar
27
awarded Supporter
Mar
27
revised JavaScript Good Patterns - Is this a good example?
added 38 characters in body
Mar
27
awarded Teacher
Mar
27
answered Select of a section of a web page and output all js used there?
Mar
27
awarded Autobiographer
Mar
27
answered JavaScript Good Patterns - Is this a good example?
Mar
16
revised Javascript scope/this
added 156 characters in body
1 2 3 4 5