Cache regexes in javascript
This post about precompiling and caching regular expressions came across my Google reader just as I was wrangling with a slow regex issue. Not sure my issue will benefit from this, but neat regardless.
This post about precompiling and caching regular expressions came across my Google reader just as I was wrangling with a slow regex issue. Not sure my issue will benefit from this, but neat regardless.
Update: The original link is now dead. Here’s another regex tester to try.
I recently had to come up with a regular expression that I could run against an HTML string that would only affect content, not tags or attribute values. I’m no regex master, so after a whole lot of failed attempts, I turned to [...]
I just got a request to edit a static page that showed several of a company’s employees. Turns out that a bunch of them aren’t employees anymore, and the client wanted the page to be updated. I knew before I even opened it that the content was going to be in tables (nested nested tables, [...]
I used to work in newspapers, and we were diligent about fixing “bad breaks” in headlines. Nothing looks worse than a headline that’s far longer on one line than on another. Desktop publishing software has some intelligence about these bad breaks, but the web, not so much. A little jQuery can clean up the bad [...]
It was just a couple of months ago that I was naively lobbying my friends to join Facebook. I envisioned creating a place where I could find out what everyone — especially people who were more acquaintances than friends — was doing, without the burden of keeping in contact with them individually. Joe was going [...]
Go get it — just for the DOM color analysis, if nothing else. If only it were integrated with Firebug, it would be perfect.
Note to self: IE6 likes to cache AJAX requests, and this can be a bad thing if other data on the page that will affect the result of the request has changed.
You’ll see this if you have two fields on a page that both contribute to a result, but only send them to the [...]
I’ve written several versions of this functionality, and each time I revisit it, it gets simpler and I feel silly for how complicated I made it before. The thing to remember when you’re working with jQuery is to always leverage the DOM. Christian Montoya has a good writeup about how he came to the same [...]
I’ve drummed up a lot of visitors by posting links on dzone and StumbleUpon, but the visitors aren’t very sticky — many will visit the single page I linked to and then move on.
Looking at my site exits in Google Analytics, I noticed that my category pages had much lower exit rates than my [...]
Update: Make sure you check out the new _trackEvent method of the Google Analytics pageTracker method. If your analytics account offers event tracking, this is the right way to do it if you don’t want your events to count as pageviews. I’ve written a new post about tracking outbound clicks using the new method.
–
Sometimes, you [...]