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

  • SEARCH
  • Home
  • 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 7062911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:39:03+00:00 2026-05-28T04:39:03+00:00

i’m currently building a small music quiz running node.js 0.4.12 and the express framework

  • 0

i’m currently building a small music quiz running node.js 0.4.12 and the express framework

currently my express setup is really really basic and only serves the base url

app.get('/', function(req, res){
res.render('index.jade');
});

i’ve implemented a small navigation which uses a really big div with a hidden overflow and an inner div with the content which gets its left value adjusted depending on what navigation title you click.

also i got a news section which runs a mongodb query whenever you click it (the content gets delivered via socket.io)

of course this is not search engine friendly at all, my news simply will never be found and running a query every time to get the news just isnt needed.
so i need some way of storing the news information and only update it when new comments get posted or when i add new news…

its also quite tedious to create working links, currently i do it via javascript using document.location.href.replace…

one more problem is that im afraid that the website becomes too big and takes too long to load if i continue to put every content i have on one single page…

so, how can i maintain the feeling of the page as it currently is ( an omnipresent player which never stops unless you leave the page ) while also serving search engines right and keeping the page loading times low?

  • 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-05-28T04:39:04+00:00Added an answer on May 28, 2026 at 4:39 am

    Let me know if I’m on the right track, as I don’t fully understand your question, but here’s how I would accomplish what you’re trying to do:

    There’s two ways to do this if you’re looking for SEO benefits.

    Either load everything from the server on a single page, and then use CSS and Javascript to manipulate the content after it’s been loaded…

    OR

    Set up your page in a traditional manner (each navigation tab links to a new, full page), and then use Javascript to load your content via AJAX as you like.

    In both of these scenarios, Google can crawl your page/site structure and get everything it needs, and you can still use JS to layer on interaction for your users. Whatever you end up doing, the SEO rule is generally ‘treat it like I don’t need JS to load all of your content’.

    It sounds like you have the first scenario covered, though instead of using JS in your links, I would make them standard HTML anchor links using ids.

    If you are interested in the second scenario, this is what I’d recommend:

    First, approach your navigation as if it did not require javascript to work properly. That means each navigation element links to a separate page (each of which will require a separate route in express).

    If you’re using Jade to render your templates, I would use its inheritance features to manage your markup. Basically, you’d put all your html into layout.jade, and in the large div you’re using for the page content, you’d create a block with the default content inside. The routes you set up for each nav element would then call different templates that extend index.jade and write the page-specific content into the block you created.

    Here’s an example:

    app.get('/', function(req, res){
      res.render('index.jade');
    });
    
    app.get('/section1', function(req, res){
      res.render('section1.jade');
    });
    
    app.get('/section2', function(req, res){
      res.render('section2.jade');
    });
    

    This ensures that every time you visit http://yoursite.com/section1, the entire page is rendered (header, footer, and all), but you don’t have to duplicate the header and footer code in every template. It just lives in index.jade, which gets extended by those other section-specific templates.

    When setting up your news feed, unless it’s pushing real-time news updates to the client, I would ditch the socket.io setup, and instead have it load from your database when the page loads. Grab whatever comes back from the DB on page load, and pass it to your jade template via the local variables. For example:

    app.get('/news', function(req, res){
      res.render('news', {
        newsArticles: newsArticles
      });
    });
    

    Finally, when you have this working like a standard website would (traditional http page loads vs. javascript loading), then layer on your javascript to transform the page into one that loads the content via AJAX. I use jQuery to do this and it works beautifully. Write some jQuery code that attaches a click event to each one of your navigation items. This click event would grab the URL from the href in your link, and then pass it to the jQuery ‘load’ method, which would then replace what’s in your main content area with the markup from the page it just loaded via ajax.

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

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I am currently running into a problem where an element is coming back from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.