Thread: testing for 404
View Single Post
Old 11-06-2012, 06:57 AM   PM User | #2
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,863
Thanks: 9
Thanked 291 Times in 287 Posts
Dormilich is on a distinguished road
yes, you can do that with AJAX. there are 2 principal ways to do it:

- only check for the file: make a HEAD request (like GET, only it asks for headers). check if the status property is 404.

- make a regular file request. check if the status property is 404.
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote