Question

One SEO advice we got was to move all javascript to external files, so the code could be removed from the text. For fixed scripts this is not a problem, but some scripts need to be generated as they depend on some ClientId that is generated by asp.net. Can I use the ScriptManager (from asp.net Ajax or from Telerik) to send this script to the browser or do I need to write my own component for that?

I found only ways to combine fixed files and/or embedded resources (also fixed).

Was it helpful?

Solution

How about registering the ClientIDs in an inline Javascript array/hash, and have your external JS file iterate through that?

OTHER TIPS

Spiderbots do not read JavaScript blocks. This advice is plain wrong.

Some javascript can break W3C validators (and possibly cause issues with some spiderbots) You can reduce this by placing this code around your javascript:

< !-- no script

... your javascript code and functions ...

// -->

Note: remove the space between "<" and "!" as it seems to comment out the example here :-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top