Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

Creating a URL still exists page/util
 

Laphan




quote this post edit post

IP Loged report this post

Old Post  12-28-05 - 11:38 PM  
Hi All

Quite familiar with ASP and JavaScript and wondered if there is a method out
there that allows me to create a web page util to see if URL links are still
valid.

In other words I've created a system whereby a user can add their own
links/urls page, but they want to periodically check whether all of these
links by executing a multi-check.

My theoretical thought on this would be that the script would check if it
receives a 404 on each page request and mark a flag if and when it gets it,
but as to how I would do this in ASP or JavaScript, I have no idea.

Have you seen anything like this before?

Thanks

Laphan




Post Follow-Up to this message ]
Re: Creating a URL still exists page/util
 

Brian Wakem




quote this post edit post

IP Loged report this post

Old Post  12-28-05 - 11:38 PM  
Laphan wrote:

> Hi All
>
> Quite familiar with ASP and JavaScript and wondered if there is a method
> out there that allows me to create a web page util to see if URL links are
> still valid.
>
> In other words I've created a system whereby a user can add their own
> links/urls page, but they want to periodically check whether all of these
> links by executing a multi-check.
>
> My theoretical thought on this would be that the script would check if it
> receives a 404 on each page request and mark a flag if and when it gets
> it, but as to how I would do this in ASP or JavaScript, I have no idea.
>
> Have you seen anything like this before?


No idea about ASP or JS, but trivial in Perl.

$ perl -MLWP::UserAgent -e '$ua=LWP::UserAgent->new()
$res=$ua->get("http://www.example.org/");print $res->code . " " .
$res->message . "\n"'

200 OK

$ perl -MLWP::UserAgent -e '$ua=LWP::UserAgent->new()
$res=$ua->get("http://www.example.org/broken-link.html");print $res->code .
" " . $res->message . "\n"'

404 Not Found



--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png


Post Follow-Up to this message ]
Re: Creating a URL still exists page/util
 

Brian Cryer




quote this post edit post

IP Loged report this post

Old Post  12-28-05 - 11:38 PM  
"Laphan" <info@SpamMeNot.co.uk> wrote in message
news:11r5hvoa1kbp753@corp.supernews.com...
> Hi All
>
> Quite familiar with ASP and JavaScript and wondered if there is a method
out
> there that allows me to create a web page util to see if URL links are
still
> valid.
>
> In other words I've created a system whereby a user can add their own
> links/urls page, but they want to periodically check whether all of these
> links by executing a multi-check.
>
> My theoretical thought on this would be that the script would check if it
> receives a 404 on each page request and mark a flag if and when it gets
it,
> but as to how I would do this in ASP or JavaScript, I have no idea.
>
> Have you seen anything like this before?
>
> Thanks
>
> Laphan

I'm quite sure you won't be able to do this with JavaScript.

You ought to be able to do it with ASP, but I'm not an ASP developer, and I
couldn't see any obvious links when I googled just now, but that probably
means I was using the wrong keywords to search on.

Something to consider: Why do this in ASP or JavaScript at all? Your basic
idea (of periodically checking links) is good (I do this on one of my
systems), but isn't this naturally an off-line activity? If you do this with
ASP it implies that it is being done in response to a web page request (and
waiting until you've verified the links before generating the page will be
very very slow.) If you treat it as an offline activity (i.e. one which is
done independently of any page requests) then you can use any programming
language you like, and either use the WinInet library or generate a direct
socket connection to get the server response.

So, excellent idea, but (personally) I think you're considering the wrong
tools.
--
Brian Cryer
www.cryer.co.uk/brian






Post Follow-Up to this message ]
Re: Creating a URL still exists page/util
 

John Bokma




quote this post edit post

IP Loged report this post

Old Post  12-28-05 - 11:38 PM  
"Brian Cryer" <brian.cryer@127.0.0.1.ntlworld.com> wrote:

[ link checking ]
> I'm quite sure you won't be able to do this with JavaScript.

I'm quite sure you can, otherwise things like AJAX wouldn't be possible.

--
John                       Perl SEO tools: http://johnbokma.com/perl/
or have them custom made
Experienced (web) developer: http://castleamber.com/


Post Follow-Up to this message ]
Re: Creating a URL still exists page/util
 

Brian Cryer




quote this post edit post

IP Loged report this post

Old Post  12-28-05 - 11:38 PM  
"John Bokma" <john@castleamber.com> wrote in message
news:Xns973A898CAA984castleamber@130.133.1.4...
> "Brian Cryer" <brian.cryer@127.0.0.1.ntlworld.com> wrote:
>
> [ link checking ] 
>
> I'm quite sure you can, otherwise things like AJAX wouldn't be possible.

Thanks John. I stand corrected (and educated - I wasn't aware of AJAX
before). It looks like you CAN do this with JavaScript. Example (one of many
I'm sure) at http://developer.apple.com/internet...xmlhttpreq.html
--
Brian Cryer
www.cryer.co.uk





Post Follow-Up to this message ]
Re: Creating a URL still exists page/util
 

William Tasso




quote this post edit post

IP Loged report this post

Old Post  12-28-05 - 11:38 PM  
Writing in news:alt.www.webmaster,freeserve.webspace.authoring
From the safety of the Posted via Supernews, http://www.supernews.com
cafeteria
Laphan <info@SpamMeNot.co.uk> said:

> Hi All

How do you do?

> Quite familiar with ASP and JavaScript and wondered if there is a method
> out
> there that allows me to create a web page util to see if URL links are
> still
> valid...


ServerXMLHTTP:
http://support.microsoft.com/defaul...b;en-us;Q290761

or, for client side use research: XMLHTTP

--
William Tasso

Save the drama
for your Mama.


Post Follow-Up to this message ]
Re: Creating a URL still exists page/util
 

John Bokma




quote this post edit post

IP Loged report this post

Old Post  12-28-05 - 11:38 PM  
"Brian Cryer" <brian.cryer@remove.127.0.0.1.this.ntlworld.com> wrote:

>
> "John Bokma" <john@castleamber.com> wrote in message
> news:Xns973A898CAA984castleamber@130.133.1.4... 
>
> Thanks John. I stand corrected (and educated - I wasn't aware of AJAX
> before).

Where have you been? I mean, AJAX is the hype of 2005 :-D

--
John                       Perl SEO tools: http://johnbokma.com/perl/
or have them custom made
Experienced (web) developer: http://castleamber.com/


Post Follow-Up to this message ]
Re: Creating a URL still exists page/util
 

David Dorward




quote this post edit post

IP Loged report this post

Old Post  12-28-05 - 11:38 PM  
John Bokma wrote:
> "Brian Cryer" <brian.cryer@127.0.0.1.ntlworld.com> wrote:
> [ link checking ] 

> I'm quite sure you can, otherwise things like AJAX wouldn't be possible.

If you use AJAX for that then you are limited to the domain that the page is
coming from, and you have to ask the user's browser to hit your server for
every link you want to check. It would be *far* faster and easier to do
this server side.

--
David Dorward       <http://blog.dorward.me.uk/>   <http://dorward.me.uk/>
Home is where the ~/.bashrc is


Post Follow-Up to this message ]
Re: Creating a URL still exists page/util
 

John Bokma




quote this post edit post

IP Loged report this post

Old Post  12-28-05 - 11:38 PM  
David Dorward <dorward@yahoo.com> wrote:

> John Bokma wrote: 
> 
>
> If you use AJAX for that then you are limited to the domain that the
> page is coming from, and you have to ask the user's browser to hit
> your server for every link you want to check. It would be *far* faster
> and easier to do this server side.

Of course. But it's not impossible :-) Also, with a small server side
script you can jump outside the domain, and with AJAX you can make a nice
incrementally updated webpage:

link 1 - ok
link 2 - not working
link 3 - working...
link 4 - todo
etc.

If there are a lot of links to be checked, I would probably use the latter
if the visitors want to have something to look at real time.

--
John                       Perl SEO tools: http://johnbokma.com/perl/
or have them custom made
Experienced (web) developer: http://castleamber.com/


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 04:06 PM. Post New Thread   
  Previous Last Thread   Next Thread next
Webmaster forum archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top