sabbir
sabbir

Reputation: 2025

jquery and javascript not working

Recently I develop a web application which has worked very well, than I move this web application into 000webhost.com and my domain is ks-hospitaldemo.tk. Now my problem is after upload my web application into free server my all JavaScript and jQuery are not worked. I use the following code ::

  <footer id="indexFooter">

  </footer>
</div>
<script type="text/javascript" src="_javascript/jquery-1.9.1.js"></script> 
<script type="text/javascript" src="_javascript/menuBar.js"></script> 

All my JavaScript file is placed into _javasSript folder in server.

Then I check my code and find some code which is not done by me, probably hosting server. This code is given below::

<!--//--><script type="text/javascript" src="http://stats.hosting24.com/count.php">
</script> <!--//--><script language="javascript">
<!--bmi_SafeAddOnload(bmi_load,"bmi_orig_img",0);//-->
</script>

Please help me to find my problem.

Upvotes: 2

Views: 1025

Answers (3)

c-toesca
c-toesca

Reputation: 997

Some proxy / CDN services / providers inject or transform code in your .html pages to "speed up" data transfer. I had the same problem when accessing my website from a smartphone.

The solution that worked for me was to append Cache-control in the head of the page:

<meta http-equiv="Cache-control" content="no-transform"/>

Upvotes: 0

user2712640
user2712640

Reputation: 31

You may want to check the permissions on the _javascript folder. Also, 000 Webhost is known to have problems with Google Analytics. If you have a Google Analytics code on your site, try disabling it.

Upvotes: 0

leepowers
leepowers

Reputation: 38298

The new web server is using case-sensitive file lookups. The exact name of the directory is _javaScript but it's referenced in the HTML as _javascript. Use the exact name to fix the problem:

<script type="text/javascript" src="_javaScript/jquery-1.9.1.js"></script> 
<script type="text/javascript" src="_javaScript/menuBar.js"></script> 

Upvotes: 2

Related Questions