Pass: 0


Inline scripts and style tags

Transparency policy

Pertains both to inline and external scripts:

In the latest versions, scripts are passed through on a 1:1 basis. That means, that they are hooked out of the target page and hooked back into the main page without modification. That way, you have maximum control but also complete responsibility. Nevertheless, Ajaxify still has a read-only peek into the script text, giving rise to the following hints:

Detailed description of inline-script hints


  • “inline” set to “true”: All inline scripts are re-fired, no matter what the contents of “inlinehints” is, but excluding those specified in “inlineskip”
  • “inline” set to “false”: No inline scripts are re-fired, except those with class=’ajaxy’ and those specified in “inlinehints” (see examples below):
  • “style” set to “true”: All new style tags are loaded
  • “style” set to “false”: All new style tags are ignored

Example hints for inline scripts with “inline” set to true

Multiple hints have to be separated by comma + space

inlineskip Scripts skipped
‘adsbygoogle’ All inline scripts containing the string ‘adsbygoogle’

Example hints for inline scripts with “inline” set to false

Multiple hints have to be separated by comma + space

inlinehints Scripts re-fired
‘SyntaxHighlighter’ All inline scripts containing the string ‘SyntaxHighlighter’
‘SyntaxHighlighter, WP_’ All inline scripts containing the string ‘SyntaxHighlighter’ or ‘WP_’

Avoiding unwanted recursion

Inline scripts that contain the string:
"new Ajaxify("are NOT fired on subsequent loads!

41 thoughts on “Inline”

  1. Hi, i have a google banner inside of #site div,
    but after page load with ajaxify banner is not showing,

    jQuery(‘#site, #header, #footer’).ajaxify({
    forms: false,
    verbosity: 20

    what i missed?
    i would ask if there any way to add a animation during page load?


        1. Hi,

          thanks for posting back!
          Great site!

          Please read the docs on using Adsense with Ajaxify.
          To cut a long story short, it is more complicated to integrate an ad in the content div(s).
          It’s much easier to integrate it outside of the content div(s).

          Also – feel free to test version 7.0.0, if you like…

          If you have some follow-up questions, please post back.

          Thanks and

          1. Hi Brdn,

            thanks for your feedback. It might be due to bodyClasses handling? Main thing is, that it works now…

            Thanks and

          2. Hi,
            how can i skip 2 things in “inlineskip”?
            i tried inlineskip: “adsbygoogle, adsbyxxx” and didn’t work


          3. Hi Brdn,

            yes, exactly: separated by “comma and space”.

            I checked your call of Ajaxify and you might want to wipe out:


            …which doesn’t make any sense


          4. Hi admin,
            Thank you, i removed “inlinehints:true”

            i’m trying to active page level ads, hope i can fix the problem
            “Only one ‘enable_page_level_ads’ allowed per page.”

  2. Hi Sir,

    Congratulations & thanks for sharing your work : that is simply a real pleasure to get it action !

    Mmm, i meet a problem with inline script and i hope you will have a couple of minutes to help me :

    One of my reply contains :

    Try me…


    And i got this message in console :
    Bad inline script text in apptext:

    My options are :

    maincontent: “#body_screen_container”,
    prefetch : false,
    memoryoff: true,
    verbosity: 10,
    inline: true,
    deltas: true,
    inlinehints: “ajaxy”

    Thanks by advance for your help,


    1. Hi there!

      Thanks for your enquiry and using Ajaxify.

      Could you please try the following:



  3. Excelente script!

    I have a question, I have some extra js but not charged even facebook comments either, as it could fix it?

    and also to update my menu to activate the current menu?

    my project is this:

    1. Hi Alejandro,

      it’s a bit of a communications problem – I can’t understand you.
      Thanks for the link! Great site!

      You have an error in the console – could you please take care of that first?

      I had a look at your Ajaxify call in here:

      It looks alright, but you could try calling with the simplest configuration first:


      (because you’re vastly using the defaults anyway)


      1. Sorry, I do not write English well and use translator


        I corrected the errors and console.

        I am using ajax fi as you mention.

        Font Awesome use it with your CDN but calls a js and using standard ajaxify not show icons

        – The facebook comments plugin does not work when using ajaxify

        You can check the top menu any section icons are not visible and there is a blue button on listings which opens a hidden menu with social networks and does not work

        As you can do to make the main menu when entering a section is active?

        I found a history.js but obsolete which use it and got the div of the new menu and replaced it with ajaxify can be done?

        Demo menu:

        //Append new menu HTML to provided classs
        var request = $(data);
        $(‘#main’).replaceWith($(‘#main’, request));


  4. Please i have BIG problem:
    in my pages have some ADV script with document.write …
    how can solve?

  5. Please i have BIG problem:
    in my pages have some ADV script with document.write …
    how can solve?

  6. I’m afraid that’s impossible, since I work on the localhost, but I can send you an example of non-working code

  7. Hello, I have a problem when working with your plugin.
    When changing pages, I need to be rebooted one script, it contains information like:

    Info = new Array;
    Info['page'] = 'home';
    Info['user'] = 5;

    All settings are standard, how can this be done?
    And yet it would be great to add a method to the plugin, which will be called before the page loads.

        1. Hi Max,

          it shouldn’t really matter, where the “script” tag is – it should be re-fired.
          Could you do the following, if possible:

          1) Drop a link to your site
          2) Hotlink to, so I can add some $.log() messages…

          Otherwise feel free to contact me via eMail, if you need it to be treated discretely…

  8. Hello.
    I use $('#content').ajaxify({'verbosity': 0, requestDelay:400});
    Some pages have inline scripts like that:



    But when use Ajaxify< that code doesn't run, more than, if look for page source, it would be next:



    Whithout any code in script tag.

    What can you advise?

    1. Hello Ilya,

      thanks for your interest in the plugin!
      It seems that WordPress strips out the “script” tags.
      Could you re-submit the script, without “script” tags,
      and possibly the error message as well?


  9. Html tags were stripped from my previous reply,so I’ll rewrite it.

    I use the standard jQuery(‘#content’).ajaxify(); code. Pages load very nice, however my inline javascript code which is inside the #content isn’t fired. The script tag is changed to div class="ajy-script" and the javascript code inside is visible on the site as a normal text. How can I fix that?

    1. Hi Kfinto,

      please excuse the delay, only saw that comments were pending just now…
      One question before we go into detail – how have you set the parameter for “inline“?
      (It should be set to “true“)
      Maybe if not top secret you could provide a URL to the test page…
      I would doubt, that the scripts aren’t fired at all, if you set the above parameter correctly.
      Feel free to have a look at our partner-site:
      There are at least two inline scripts being handled correctly within “#content”.
      One for the date at the top of the content section and one for displaying the PageRank Bar…

      1. Hi!

        Thanks for the reply. I can provide more details as I worked on that a bit. I use jQuery('#content_ajax').ajaxify({requestDelay:300});, there is no ‘inline’ parameter specified, so it’s value should be ‘true’ as default. I was wrong. Almost all inline scripts are fired but there are also created divs with js code (their class is .ajy-script so i set display:none on them. They are invisible now but they are still there). Almost all inline scripts are fired – those containing another ajax requests (to get data from youtube) didn’t work, so I moved them to the header and I use .each to fire them when proper elements are loaded on the site.
        To sum up, I found a workaround for this issues but they are still existing. (This is a temporary site and will be changed in the near future)

        Thank you for the plugin. Everyting but this works great.

          1. Hi again and thanks for clarifying that!

            So the scripts are fired but the nuisance is “rests” of the scripts remaining on the page as divs with ‘.ajy-script’ class.
            This is, strictly speaking a bug and now has top priority for me.

            I will modify the code, when pulling in the scripts from the target page.
            Ideally that would do the trick…

            I’ll implement and test this asap!

            Thanks for your awareness – nobody had posted about this before, but it surely was a nuisance for one or the other.

          2. Done, presumably 🙂 (the only file, that contains the new logic is at the moment, feel free to test)

            I’ve tested against our partner site: by seeding the following code there (towards the top of the pages, right beneath the date)

            console.log("Test") in “script” tags…

            The “script” tags along with the console.log… survive the dynamic loading of #content.
            I presume the bug only pertained to the content divs that were loaded dynamically.

            Please test against your site and give us a hint, whether it works…

            Thanks and regards

  10. Hi.
    I use the standard “jQuery(‘#content’).ajaxify();” code. Pages load very nice, however my inline javascript code which is inside the #content isn’t fired. The tag is changed to and the code is visible on the site as a normal text. How can I fix that?

Leave a Reply

Your email address will not be published. Required fields are marked *

Show Buttons
Hide Buttons