W
W
westdp2016-01-14 15:14:15
JavaScript
westdp, 2016-01-14 15:14:15

Why is the page code (Ctrl + U) different from the browser client code?

There is a question regarding the implementation of a site with dynamic content, i.e. when changing the url, for example
.../?lang=javascript/New%20York, the word javascript and New York is taken and inserted in the right place on the page, I implemented this using js, for example like this:

//Title Page
    var job = loc_url.split('/')[0];
    //Description
    var location_job = loc_url.split('/')[1];
    //Someone word
    var word = job;
        //url dont have location
        document.title = 'Remote ' + job + ' professionals available now';
        $('meta[name="description"]').attr('content', 'Quality remote ' + job + ' talent available to work with your in-house team within 4-6 weeks. Access hand-picked specialists from Europe’s largest and most affordable software engineering hub. Scale your ' + job + ' capabilities while staying lean and agile');
        $('header .content .text-block h1').html('Paying too Much for ' + job + ' software developers?');
        $('header .content .text-block h2').html('Find out the real market rates for quality remote ' + job + ' software developers and always pay the right price');
        $('.spanScroll').html('(scroll to request resumes from our pool of available ' + job + ' engineers)');
        $('.tap-our h2').html('Tap our on-demand developers to seamlessly integrate with your in-house team!');
        $('.third-block h2').html('we have a number of excellent ' + job + ' candidates in our database. Join the ranks of our happy clients who have augmented their ' + job + ' teams with remote developers sourced by us');
        $('footer p').eq(1).html('to get resumes of ' + job + ' software developers available to work for you right now');


So this is the essence of my question, how to make this js code work when viewing the page code:
view-source: ...?lang=javascript/New%20York, i.e. now if you press Ctrl + U and look at the code, then the fields are empty, i.e. js code is not working.
As far as I understand it, this is very important for SEO.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2016-01-14
@westdp

Don't do it at all. If you need something to be in the source code of the page when it is received by the browser, generate it on the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question