Javascript, PhP and SEO Impact?
-
What are the Pro's and Con's of using Java Script and PHP in a site when factoring in SEO?
-
Alan's answer is spot on.
Avoid javaScript or carefully follow best-practices so Google can crawl all content without reading javaScript. Alan is exactly right when he said: never count on Google crawling through your JavaScript to find content, but also never count on being able to hide anything from Google via JavaScript.
Whether you use PHP or not is not directly relevant. PHP is executed server-side, so Google never sees your PHP code and doesn't care. What matters is whether your programmer writes PHP code that will generate search friendly HTML code, url structure, etc.
-
JavaScript is one of several technologies that offers severe limitations in search engines and their ability to properly see content, then just as important but often overlooked, properly and cleanly evaluate that content from an SEO perspective.
Specific considerations:
- Google does a "fair" job at discovering content passed through JavaScript (either on-page or at the code level)
- A "fair" job means it's hit and miss as to whether their system can actually find that content
- Whatever content the Google system CAN find via JavaScript is NOT necessarily able to be used to properly evaluate content intent, focus or relationship to other content
So - the best practices recommendation is if you want/need content to be found and properly evaluated by Google (or Bing) do NOT pass it through JavaScript.
And also, if you want to HIDE content from Google, don't assume you can successfully do so via JavaScript either.
As for PHP, its the most widely adopted and utilized web programming language out there. The language by itself is essentially SEO neutral. It's all in how a programmer utilized PHP that matters. In the hands of a programmer that either truly understands SEO or collaborates closely with an SEO expert (who also understands the limitations/pitfalls that can arise with "bad" (SEO-unfriendly) PHP coding, it's a great language.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Are provincial third-level domains bad for SEO?
My prospect's domain ends in ".on.ca" (Ontario, Canada). The structure of their site is companyname.on.ca (main page) and all other pages are sub-folders (companyname.on.ca/page-name-1 All pages are no more than two levels deep. I'm wondering if anyone knows if the provincial sub-domain (.on.ca) presents an SEO challenge?
Web Design | | 22Eighteen1 -
On Page Local SEO
What do you believe is the best approach when it comes to Local SEO for businesses in 2013?
Web Design | | BlueRockDigital0 -
WIX? is it any good for SEO
Hi people. I have just built my website www.bellagiolimousines.com.au using WIX. I am in the process of optimising for SEO, and after reading a couple of older posts i.e 2012; I read that some SEO consultants do not like WIX. However with their recent upgrades, I was hoping if anyone else has had any recent experience with WIX? I have spent a considerable amount of time building this site, and I don't want to waste anymore time in optimising it, if I am not going to receive a top 3 organic SERP. Hope to hear from someone real soon!
Web Design | | Giorgio680 -
SEO Searchable? Starting a New Forum for Company Community
Hi Mozzers, I'm new here and am looking forward to learning from this awesome group of SEOs As my company's Web Optimization Manager, I'm in charge of just about anything SEO related. We are an education company and we are looking to build a new forum so students (both new and old) and continue interacting within our community. We also want to use this as a tool for new users and potential new customers through search (obviously). We are in an internal debate as to how we should make the forums and the implications on search it may have. Some managers want the content available only to members, others want the content read-only to the public, and the tech team building the forum says that "it'll be an issue making the content available to the public without a log-in." So my questions are: (1) Will we still be searchable if we make our content "read-only" for non-members? Members will have the ability to log-in and comment and post etc (similar to this forum). (2) Will be searchable if we make the content completely private and available only to members. What I mean by private is perhaps, we'll make the title of the forum thread public but not the actual responses. Along these lines, what would happen if we made everything private (including the tite). Will Google still pick up on our content in a search result and a potential user only not be able to see anything? (3) What would you all suggest to make this flow the right way? Hope to hear from you all soon. Thanks
Web Design | | Pedram_SEO1 -
What is the best slideshow pluggin for seo in order to show alt of the images
what is the best slideshow pluggin for seo in order to show alt of the images
Web Design | | maestrosonrisas0 -
SEO and Modal Windows
Hi all, My website has a Login and Join Us option on every page in the site. Each Login and Join Us window pops up as a modal window. In other words, the user must interact with it before they are taken somewhere else (whether they close it or fill it in). It has come to my attention that this is being counted as duplicate content. Is there any way around this? It's calling duplicate content on practically the whole website. Thanks in advance!
Web Design | | Info12340 -
Political Campaign SEO
We are considering taking a candidate for office on as a client. The run would be for a state office in the U.S. by someone who is involved in politics/government but not currently an elected official. The candidacy would not be for a couple of years and the exploratory committee approached us asking if we would take on. Sooo, decision time. First, yes I like the candidate (as much as I like business I could not do it otherwise). Next, candidate has no real public persona other than FB, LinkedIn, etc. Our approach is to shut all down all social first - to prevent anything that is harmless from being manipulated - and then revise to a political run. Also to create a site for candidate that is not necessarily a political one that could gain some DA, PA over time as the candidate begins to put out opinion pieces, etc. around their beliefs in what is workable/needed. We would maintain the site utilizing SEO until the announcement to run is made and then have a full political candidacy site go live with 301's from old site. Obviously, I am not at liberty to say names, etc. and some of our strategy specifics must be kept confidential as well. I would be interested in your opinions and thoughts on the approach and also if someone has handled SEO/SEM politically and has insight as to whether I should act like I am in the movies and ... RUN FORREST RUN!!! 😉 Thanks,
Web Design | | RobertFisher1 -
To many scripts in my homepage. This is a problem in SEO?
I adding a lot of new features to my website: JS animated, menus, google translate, alexa counter, google analytics, salesforce, and so on. My website is full of scripts and im worry about the SEO. Is that an issue?
Web Design | | Naghirniac0