Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8343519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:05:24+00:00 2026-06-09T06:05:24+00:00

I have a WebPage made that is 90% Javascript. All of the WebSite is

  • 0

I have a WebPage made that is 90% Javascript. All of the WebSite is rendered dynamically.

I want this content to be rendered by the server as well so that Google can crawl and index all of my content and links.

I know that in order not to get banned by google, the content of the dynamic page and the server rendered page must be almost identical.

I don’t want to code two different pages (one from the client with Handlebars and one from the server with ERB in this case).

So I thought of PhantomJS. What I want is that when I get the _escaped_fragment_ param from google, I open the page without that with PhantomJS and I render this to HTML from PhantomJS and return that from the server to Google. This way, I don’t have to create two different pages for anything.

I know that I can use Handlebars for Server Side templating as well, but I’d have to code everything twice anyway.

Does anybody know how to accomplish this with PhantomJS? Is there any other way for not repeating the Logic and code Twice and have Google index the Site?

Thanks!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:05:26+00:00Added an answer on June 9, 2026 at 6:05 am

    Yes you can.

    Add the following to the of your Javascript intensive page

    <meta name="fragment" content="!">
    

    When the Google bot finds this tag, it will issue a new http GET request. This time, it will add ?_escaped_fragment_= to your URL.

    So if your web page with Javascript is located at:

    www.mysite.com/mypage
    

    Google will issue a new GET using the following URL:

    www.mysite.com/mypage?_escaped_fragment_=
    

    In your Ruby GET handler, you simply call PhantomJs with the unescaped URL (just do a string replace). In your PhantomJs javascript code, wait for the page to render and then then extract the HTML using regular javascript and return it back to your Ruby GET handler where you will simply respond to the GET with the HTML text string.

    In this way you do not have to write your code twice. The solution is generic and will snapshot anything.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made this webpage, you can check it out here http://www.bettingtowin.net/webcam.html I have
I have a webpage that redirects to another webpage like this: http://www.myOtherServer.com/Sponsor.php?RedirectPage=http://mylink.com/whereIwasgoingtogo.html Then the
I have a webpage made of a lot of PHP and Jquery/javascript I have
So I have this webpage built that has a photo gallery on the left
I have made webpage that uses Ajax to update some values without reloading the
I have a JavaScript class that I have made and put it into its
I have found a javascript function that inverts colors on webpage: String javascript =
I made a webpage that needs javascript. More specifically if anyone has heard of
I have taken script from a webpage document I have made and I have
I have a webpage that is transferring A stylesheet as a text/plain MIME type.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.