Jump to content

Working with Angular JS


sugafree

Recommended Posts

Hi,

 

I hope this subject should be under javascript.. If you design a great website using angularJs, might sound great but what about search engines and visitors without js or whatever other stuff it needs. Could you guys give me some ideas on this subject? Example design a website like gumtree.com, the content is the main thing which is the main thing to be handled by angular, but how you deal with the search engines? Heard about prerender but is google going to look at each possible variation as a new page(which would be good) also if not all your content needs to be dynamic, example you have many static stuff and writings plus products. Is it better to only use angular JS on the product area and keep as much as possible in html? Could I use angular to boost search engine results, like each variation for your product is being seen by google like an new page, more pages = better results..

 

 

What if someone does not have JS at all? Is almost anyone have JS installed on the device to have angular be so popular? Also is there a way to use the prerender version of the website for non JS visitors? Like example gumtree. You need to allow the users to post adverts, which has to be stored in a database. Nice and everything, but in this case you can not just write a html version and load that one for each non-JS visitors because that case you would have to modify it each time someone posts a new ad. Is there any automatic way of doing this or any way of having a simple html page automatically created for non js visitors, but having accurate data there!

 

hope you guys can understand what I was on about.

Link to comment
Share on other sites

Regardless of how you design your site, what a search engine sees is what you see when you go to the site in your browser and view the HTML source code. Anything you want the search engine to see should be there. Javascript is typically used to modify the existing content to make it easier to use, but the content should already be there and the site should be completely usable without Javascript (if that is one of your design goals). That means that you need to use regular links for everything, but you can have Javascript attach event handlers to those links to override the default behavior. But if Javascript is disabled then the links still work and take the visitor to whatever page they clicked on. That is referred to as graceful degradation.As far as showing dynamic data, that is not Javascript, that is a server-side language like PHP plus a database. The server-side language generates all of the HTML content, Javascript just changes how it gets displayed and used. Even if Javascript is sending ajax requests for dynamic data, that data is coming from a server-side language.

Link to comment
Share on other sites

But what is angular JS than? I think it pulls out the actual content, example ad listings is made up of a pic, description and price, all this is stored in an external file if im right. So will prerendering sort out this issue, meaning google searchbots will see the full html with content?

 

Also is there a way to automatically generate a simply html/css version of the website? Eg creating the same website using html and css only and some program-script or anything will pull the data from the angular site to insert it into the html version each time someone posts a new ad

Link to comment
Share on other sites

That issue is not specific to AngularJS. Your issue is with dynamically adding content to a page with AJAX. Google has documentation for dealing with this.

https://developers.google.com/webmasters/ajax-crawling/docs/getting-started?hl=en-US

Link to comment
Share on other sites

But what is angular JS than?

I haven't used it in anything, but from looking at the site it looks like an attempt to implement a template engine in Javascript. While that's fine in theory, any search engine that does not execute Javascript is not going to see the rendered content, it is going to see the template markup. There's more information here:http://stackoverflow.com/questions/13499040/how-do-search-engines-deal-with-angularjs-applications

Also is there a way to automatically generate a simply html/css version of the website?

That's what server-side languages do.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...