HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 37. CH34 GETTING FEEDBACK 297


seeing.


If your page is generated dynamically, using CGI or an equivalent technology,
the page generation program can keep a count of visitors, and can display
it as part of the page itself.


If your page is static, you can still insert dynamic elements into it using
JavaScript. Those dynamic elements could keep a pageview count.


You can do a Google search for “page view counter” to find things that are
free and easy to install.


Counters require someone to remember and provide those numbers to you.
You will have to create an account on their server, or install their software
on your server.


37.2 User Comments


Many webpages allow users to leave comments. This serves several useful
purposes.


First, it allows users to build a sense of community. They can talk to fellow
viewers. They can hear alternative interpretations to the significance of
what was on the page.


Second, it allows the content creators to listen to their community, and
possibly respond back. You might be surprised and delighted or dismayed
at what your viewers are thinking and saying.


Third, much like using a pageview counter, it tells viewers that your page
is popular.


There is a downside: Spam. Spammers can leave comments too. They can
say things like:


Wonderful page. Amazing. I love your work. You really made me think.
You should really check out this.


They can say the same thing, robotically, no matter what the page is about.
And some people will probably click through.


I have seen comment lists that were more than 50% spam.


There are two common responses to spam. (a) UseCaptcha or similar
technology to have the user prove they are not a robot. (b) Use an approval

Free download pdf