append subdir to the js response