impressivewebs

On Leading and Trailing Spaces in HTML Attribute Values

In most cases, you should not use a leading or trailing space in an HTML attribute value. For example, if you add a leading or trailing space to an ID attribute, you wouldn’t be able to hook into that value in CSS using the ID selector (not that you use IDs as selectors, right?): <div id=" example"></div> /* CSS won't apply */ #example { background: red; } See the Pen ID attribute with space breaks CSS by Louis...

impressivewebs

Cache Busting Front-end Resources: Is File Name Revving Still Necessary?

This just in: Web developers are easily swayed by tentacled sea creatures. But wait, I’m getting ahead of myself. I’ll get back to that in a moment. Caching and cache-busting front-end resources have been common for a number of years now. When dealing with front-end resources, you want to be able to accomplish two things: Cache front-end resources for better performance Refresh those resources (i.e. “cache bust”) as soon as...