0

Users register url's (bookmarks) to my website. I'd like categorize url's depending on filetype whether they are HTML, image, etc. How can I detect the filetype if I can with HEAD request? Or any other solution?

Sylvain Leroux
  • 50,096
  • 7
  • 103
  • 125
Dogukan Tufekci
  • 2,978
  • 3
  • 17
  • 21
  • If security is important, you have to check it server side. If no or just want to do a prefilter, you should be able to just use a regex or check by splitting string, e.g: `var extension = uri.split('.').pop();` – A. Wolff Jun 19 '13 at 09:36
  • 2
    http://stackoverflow.com/a/843401/881224 – yurisich Jun 19 '13 at 09:45

0 Answers0