HOWTO: [jQuery, JS, regexp, SEO] Create SEO friendly filenames with jQuery and regexp
There’s no need to stress that in 2017 we MUST rename files originally named like “1230jfnfdvnasjcjsdas13.JPEG” to “our-fantastic-seo-url.jpeg” in order to obtain a better SEO result.I use this simple script to obtain from my crappy named files something more friendly:newString = filenameString.replace(/\s+/g, ‘-‘).toLowerCase().replace(/[^a-zA-Z0-9-_]/g, ”);And here’s the result:HOWTO: [jQuery, JS, regexp, SEO]…