Jump to content

Full seo friendly Ajax website


Anjmao

Recommended Posts

Hello everybody , I'm working with PHP , AJAX and jQuery to create dynamic full AJAX website that will be full seo friendly (it's very important for me) . For example , if I have url

<a class="ajaxURL" href="www.mydomain.com/products/laptops/">Laptops</a>

I can load this url conent using AJAX

 

// We're using jQuery functions to make our lives loads easier
$('a.ajaxUR').click(function(e) {
href = $(this).attr("href");

//This function would get content from the server and insert it into the id="content" element
$.ajax(
    {
	   
	   url:href;
	   context:document.body,
	   success:function(data)
	   {
		 $('#conentt').html(data);
		 $('title').html(title);   // dynamic change page title

	   }

   }); 

//This is where we update the address bar with the 'url' parameter
window.history.pushState('object', 'New Title', url);

//This stops the browser from actually following the link
e.preventDefault();
}

 

It seems that if your javascript is enabled , it will load all conent with AJAX otherwise

just simple use url normally , and search engines also can access this conent.So that do you think about this method of building full AJAX website ? Is it can be full seo friendly ? :)

Link to comment
https://forums.phpfreaks.com/topic/263171-full-seo-friendly-ajax-website/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.