We used to be able to put the javascript function definations in the
<head>
</head>
But when I try to put a large block of javascript codes right after <head> before meta, link, style tags like the below
<head>
<script type="text/javascript">
...
</script>
<meta ...
<link ...
<style type="text/css">
...
</style>
</head>
It makes the page revisit the server again. (when I use the php code to record the click, one click to this page record two clicks)
But if I put the javascript block after meta, link, style tags, it is fine. It will not revisit the server. What is the rule here about where to place the javascript block?
<head>
<meta ...
<link ...
<style type="text/css">
...
</style>
<script type="text/javascript">
...
</script>
</head>
Thanks!