Jump to content

Tried searching but to no avail? Get page title and description VIA AJAX


Recommended Posts

Hello wonderful users of this forum. I tried searching for this but to no avail. Can someone show me how to get the page title of a url and its meta description and return them onto the page in a textarea? I will be truly grateful. The only thing i can get right it the HTML aspect of this piece of code :(

Javascript can access web document header information through the Navigator and Document objects

 

Or you could try AJAX based header response functions:

http://www.w3schools.com/dom/dom_http.asp

 

Whether or not these will let you access the 'title' and 'meta-description' tags I don't know.

 

If not you may need to save a temporary copy of the web page as a text file on the server, then retrieve the information you desire through a text string analysis of the file using php or something -> using strrpos() to find the start and end tags then copy whats between them.

I tried searching for this but to no avail.

What results have you gotten what have you tried?

 

Can someone show me how to get the page title of a url and its meta description and return them onto the page in a textarea?

Will these url's be on the same domain or a different one? And what serverside languages do you have?  Is there a reason you want to use ajax?

 

I will be truly grateful. The only thing i can get right it the HTML aspect of this piece of code :(

Just HTML won't get you far do you have a basic understanding of any programming language?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.