본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

transforming (ajaxifying) A HREF results in faulty behavior

more options

Hi.

I'm very happy that the HTML5 History API now allows me to change the address bar (before # char) without doing a roundtrip to the server (and thus flicker the user's screen)..

I've implemented this on my new site, test url at http://skatescene.biz/elections (on an ADSL line, bit slow).

In order for search engines to spider my content, I'm sending from PHP all internal links as <a href="/path/to/content">, then using javascript on window.load to transform/ajaxify them to href="javascript:window.History.pushState(null, 'pageTitle', '/path/to/content');

Chrome has no problems with this at all, and Firefox has no problems if those transformed URLs are eval()-ed (which my opensource animated button and menu components do).

However, a completely normal <A HREF=""> in my content, for instance the link to "democratic party" in the content of http://skatescene.biz/elections, will in FireFox (latest version) give me a blank page with "true" on it, and in the address bar the transformed link (javascript:window.History....)

I have been unable to find a work-around for this firefox bug. Or maybe i'm doing something wrong. If you have any tips for me, please let me know.

P.S. the CODE for that site is opensourced, as thanks for the many opensource tools I use myself.. It even includes HTML+JSON caching of many pages of content for lightning fast browsing within the site :) See http://mediabeez.ws/blog/html5-history-plus-caching

Hi. I'm very happy that the HTML5 History API now allows me to change the address bar (before # char) without doing a roundtrip to the server (and thus flicker the user's screen).. I've implemented this on my new site, test url at http://skatescene.biz/elections (on an ADSL line, bit slow). In order for search engines to spider my content, I'm sending from PHP all internal links as <a href="/path/to/content">, then using javascript on window.load to transform/ajaxify them to href="javascript:window.History.pushState(null, 'pageTitle', '/path/to/content'); Chrome has no problems with this at all, and Firefox has no problems if those transformed URLs are eval()-ed (which my opensource animated button and menu components do). However, a completely normal <A HREF=""> in my content, for instance the link to "democratic party" in the content of http://skatescene.biz/elections, will in FireFox (latest version) give me a blank page with "true" on it, and in the address bar the transformed link (javascript:window.History....) I have been unable to find a work-around for this firefox bug. Or maybe i'm doing something wrong. If you have any tips for me, please let me know. P.S. the CODE for that site is opensourced, as thanks for the many opensource tools I use myself.. It even includes HTML+JSON caching of many pages of content for lightning fast browsing within the site :) See http://mediabeez.ws/blog/html5-history-plus-caching

모든 댓글 (3)

more options

A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.

more options

Thanks, cor-el. I posted it there and am waiting for the mods to OK my post.

This morning, I also tried .addEventListener() and .onClick="myJavascript; return false;" (demo of problem updated) but neither works, in Chrome nor FireFox :((((((

more options