If the syntax highlighting cannot be determined from the cookie (or it's...

... not being set or working correctly), then use the filename extension if available.