Skip to content Skip to sidebar Skip to footer

How To Change Title Without Refresh Or Reload ? It Can Be Changed By Jquery But Effect Will Not Be Done On View Source. Any Solution ?? Thanks

how to change title without refresh or reload ? It can be changed by jquery but effect will not be done on view source. i've use document.title. On browser it is changing value bu

Solution 1:

There is no way to change the source of a page with (client-side) JavaScript. The source is the raw code that was delivered to the browser.

You can change the current DOM, and a DOM viewer (such as you can find built into most browser Developer Tools) will show you a serialization of the current state of the DOM.

Solution 2:

...but when i open page source it shows blank.

Could you elaborate? I've just tried this myself and it works fine:

<head>
    <title>Abc</title>
</head>

$(document).ready(function() {
    $('title').text('test');
})

When viewing the source of the page the title now contains "test".

JSFiddle example.

Post a Comment for "How To Change Title Without Refresh Or Reload ? It Can Be Changed By Jquery But Effect Will Not Be Done On View Source. Any Solution ?? Thanks"