I have a problem with base tag. It looks like
<base href="http://myexamplepage.com/myfolder/" />
.
Everything works, besides this query:
$.get("application/soft/calendar_month_change.php", ...)
My computer thinks it's cross domain server and changes query to OPTIONS .... When I remove the base tag, it works correctly but my site doesn't show any images. I use smarty template engine. How can I solve it?
Want my opinion? Don't use
base
. Exactly for the reason presented here: It creates confusion, and influences other parts of the system in a way that is extremely difficult to debug. (Although I didn't know it even influences relative AJAX calls.)I would define a web root in Smarty, and prepend that for every image URL in the document. Changing the web root remains easy, but the browser is given absolute URLs.
You could, however, also solve this by providing an absolute URL in the Ajax request and leave the
base
in place.