tags:

views:

66

answers:

2

can a web parser differentiate between static and dynamic text on a webpage? for example there is a string on a webpage Hello "Fantastic Four"

In this "Hello" is a static data and "Fantastic Four" is a dynamic data (say being populated form a database value)

Is it possible for web parser to detect whcih is a static and dynamic content?

+3  A: 

I think that it's not possible. The client can't know anything about the executing code in the server, so there is no way that know if the text has been generated by php, asp or any other lenguaje... or even is static.

Jonathan
A: 

You can look at the URL and HTTP headers to make an educated guess if the file was served statically (directly from the filesystem) or generated. Most "web page parsers" don't get this information, however, and almost all generated pages have static bits in them. (Sometimes those are included directly in the source code, or they could be from a template or SSI file.) Distinguishing those static bits from the rest is impossible.

Roger Pate