• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Runtime Link Checker?

New Here ,
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

I've got a page that displays dynamic links and there will be times where the destination file for some links will not exist, thus throwing a 404 error. The links that do not have a destination file may change from day to day. Is there a way to check the links before the page is displayed to see if the destination file exists? And if it does not, have ColdFusion display an icon next to those links that would throw a 404 error?
TOPICS
Advanced techniques

Views

281

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 09, 2008 Nov 09, 2008

Copy link to clipboard

Copied

Hi,

Have a look at the <cfhttp> tag.

cheers,
fober

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 14, 2008 Nov 14, 2008

Copy link to clipboard

Copied

LATEST
ashe wrote:
> I've got a page that displays dynamic links and there will be times where the
> destination file for some links will not exist, thus throwing a 404 error. The
> links that do not have a destination file may change from day to day. Is there
> a way to check the links before the page is displayed to see if the destination
> file exists? And if it does not, have ColdFusion display an icon next to those
> links that would throw a 404 error?

You can use CFHTTP and the HEAD method.

--
Mack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation