Question

When I test this website, some of the javascript breaks and a checkbox won't mark itself when clicked if I'm using the url without the prefix: www.

It works fine if I do have the prefix there.

I'm not really asking for help on this specific websites problem, but does javascript need the url prefix to work properly? Is it supposed to happen that some features break when the full url isn't there?

Was it helpful?

Solution

It sounds like something else is going on. Javascript Doesn't break just because the url you accessed doesnt have www prefixed to it.

Your web server could be behaving cause of some whacky setting. You could have some funky rewrite rules going on in your .htaccess file if its Apache your on. Or it could be something in the javascript thats looking for a hardcoded url or something.

So again, the answer would be no. A prefix on a URL does not in itself prevent Javascript from working properly.

OTHER TIPS

http://www.example.org and http://example.org are two very different domains. Javascript needs a URI referencing an existing site to work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top