PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Indexing text within Javascript code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Indexing text within Javascript code

    I use a heavily modified Photoshop web galleries for speed of production for an area of a clients website, (example: http://www.patrickirelandframes.com/content/print_on_demand/galleries/Spencer_III/index.html), and although they have many 'pages' for each gallery, ultimately the content is controlled by javascript.

    Example:
    Code:
    myImagesIndexed[newIndex] = new Array("S1448-SpencerIII-TwoStepsToWriting.jpg",
     "<!-- title -->Two Steps To Writing<!-- -->",
     "<!-- size -->n/a<!-- -->",
     "<!-- category title -->Contemporary Artists<!-- -->",
     "<!-- image set title/artist -->Spencer III<!-- -->",
     "<!-- ref number -->S1448<!-- -->");
    Is it posible now or in some future release to be able for zoom search to recognise that the code is in an html page and return the text in indexes and searches? The text within the arrays would be very usefull if returned in searches.

    Jon

  • #2
    Is it posible now or in some future release to be able for zoom search to recognise that the code is in an html page
    Probalby not. The "pages" in questions, aren't HTML pages. They don't have seperate URLs and aren't generated by HTML.

    Comment


    • #3
      The Zoom Search Engine help states that Java scripting sections are removed: Is it possible to alter settings to be able to search within the '<script> ... </script>' tags in a html page?

      Users aren't going to be searching for specific javascript tags or coding, but the key words that are within the arrays will still be found and indexed and ultimately searchable and linked to in results.


      Jon

      Comment


      • #4
        Indexing Javascript code will result in the Javascript source code being included into the index. The will pollute the index with words that don't appear on the page, making the search results inaccurate. You don't know in advance what variable names, code comments and other text will be in the script. So you can't really claim people aren't going to search for whatever text is in the script.

        And it isn't good practice to have your page text in Javascript. It is preferable to include it as HTML text and use CSS to hide, display and move it around.

        Further just because the text appears in the script, it doesn't mean the text will ever be displayed to the user. Imagine a script that printed "Happy Christmas", but only did so on the 25th of Dec, and no other day. It doesn't make sense to index this text as 99.7% of the time it won't appear on the page.

        Comment

        Working...
        X