On my page I have boostrapped a javascript file to the head section. The URL is correct. The Javascript file exists on my server at that correct URL. I checked with fiddler2 and it shows that a server request is never sent for the file. The file has a simple test script
$(document).ready(function() {
alert("blah blah");
});
Now it was working just fine. It fired the alert every time I refreshed the page while I was working on that particular page for like 30 minutes. I got up, went to grab a soda and some left over pizza. Papa Johns of course. But when I came back and refreshed the page.. The javascript file no longer showed up bootstrapped to the head section. The alert no longer fires either.
<script type="text/javascript" src="js/events.js"></script>
- Hmm so I cleared cache. Refreshed, but nothing.
- Tried Firefox, Opera, IE, Safari and Chrome. Nothing.
- Checked server. Still there and nothing. Chmod 777 to the file and
its directory. Nothing. - Checked console for errors. No errors and still, nothing.
- Saved file and opened in notepad++, checked show all characters
(to find hidden treacherous keys), nothing unusual. Just Carriage
return and tab. But still of course nothing.
Mind blown. Help?
I rebooted my server and mysteriously it started working again. I’m sure there is perfectly logical explanation for this but it’s something beyond the scope of my knowledge. If someone has an explanation, I would really like to hear it. If you want I can pull out server logs if you need them.
But suffice it to say its working again.