Peter Bloomfield
  • Blog
  • About me
  • Contact me
Tagged

web-dev

A collection of 2 posts

php

PHP gotcha: Content-Type matters!

When generating CSS files dynamically in a script, be careful to set the content type correctly.

javascript

Making slugs with JavaScript and regular expressions

Slugs can be useful URL-safe identifiers for web-pages and files. This post explains how to sanitise arbitrary strings to get slugs using pure JavaScript.

Peter Bloomfield © 2008-2022
  • Privacy policy
Powered by Ghost