C
cipher
Hi there,
I ran into a problem using <a href="#some_anchor"> in combination with
<base href="...">.
I have a PHP-script which creates a report in HTML from a database.
The script is called in two ways:
1. directly via browser
2. and by a cronjob with mails the report to a mailing list
The report contains both links to anchors inside the same document and
links to external resources. Calling the script by a browser works
fine. The mailed report contains an additional <BASE> to get valid
links to external resources, but the links to the anchors inside the
report are now wrong. (Using such a link forces the browser to reload
the HTML document from server before jumping to the anchor. This may
lead to a wrong report, if some records in DB has changed since
mailing the correct report)
Do I have to rewrite all external links or is there a better solution?
thx,
Markus
I ran into a problem using <a href="#some_anchor"> in combination with
<base href="...">.
I have a PHP-script which creates a report in HTML from a database.
The script is called in two ways:
1. directly via browser
2. and by a cronjob with mails the report to a mailing list
The report contains both links to anchors inside the same document and
links to external resources. Calling the script by a browser works
fine. The mailed report contains an additional <BASE> to get valid
links to external resources, but the links to the anchors inside the
report are now wrong. (Using such a link forces the browser to reload
the HTML document from server before jumping to the anchor. This may
lead to a wrong report, if some records in DB has changed since
mailing the correct report)
Do I have to rewrite all external links or is there a better solution?
thx,
Markus