Head tag of ajax content ignored in Safari but nowhere else
I just noticed that some javascript I put in the <head> section of a page that's later loaded via ajax isn't being run in safari. For example here's a page:
- <html>
- <head>
- <script type="text/javascript">alert("hi");</script>
- </head>
- <body></body></html>
If I load that page up via ajax:
- $(body).load("page.htm")
safari never fires the alert, but all other browsers do
Is this by design, maybe head sections are supposed to be ignored in ajax content? It's not a big deal, I can easily put the script into the <body> section which solves the problem
Just wondering if it's a bug or by design. Maybe I should stop including <html><head> and <body> tags in ajax content just because of potential problems like this