Yuav Paub
- Select Safari > Preferences > Advanced > Show Develop menu hauv menu bar.
- Txhawm rau siv Develop, mus rau Safari zaub mov thiab xaiv Develop, ntawm Bookmarks thiab Qhov rai.
- Cov kev xaiv tsim tau zoo tshaj plaws: Qhib Nplooj Ntawv Nrog, Tus Neeg Siv Khoom, thiab Nrawm Caches.
Kab lus no piav qhia yuav ua li cas tso saib thiab siv Cov Ntawv Qhia Tsim Kho hauv koj lub Safari (versions 8 txog 12) web browser.
Display the Develop Menu in Safari
Ua ntej koj tuaj yeem siv Develop menu, koj yuav tsum xub ua kom pom cov ntawv qhia zais. Qhov no yog ib txoj hauj lwm yooj yim, yooj yim dua li nthuav tawm cov ntawv qhia Debug uas-ua ntej Safari 4-muaj tag nrho cov lus txib uas tam sim no nyob rau hauv Develop menu. Txawm li cas los xij, tsis txhob xav tias cov ntawv qhia Debug qub tsis cuam tshuam ntxiv lawm; nws tseem muaj thiab muaj ntau yam cuab yeej siv tau.
-
Launch Safari los ntawm Dock lossis Mac Application folder.
-
Qhib Safari qhov nyiam los ntawm nyem Safari hauv cov ntawv qhia zaub mov thiab xaiv Preferences hauv cov ntawv qhia zaub mov.
-
Click the Advanced tab nyob rau hauv qhov kev xaiv xaiv.
-
Xaiv Show Develop menu in menu bar.
Yog koj puas xav lov tes taw Developer menu, tshem tawm cov cim kos hauv Safari > Preferences > Advanced npo.
Using the Develop Menu
Cov ntawv qhia tsim tawm tshwm nyob rau ntawm Safari menu bar ntawm Bookmarks thiab Qhov rai cov ntawv qhia zaub mov. Cov ntawv qhia tsim tawm yog qhov tshwj xeeb rau cov neeg tsim tawm hauv lub vev xaib, tab sis cov neeg siv tsis xws luag kuj yuav pom tias muaj txiaj ntsig.
Qee qhov Tsim cov ntawv qhia zaub mov uas koj yuav pom cov txiaj ntsig zoo tshaj plaws suav nrog:
- Qhib Nplooj Ntawv Nrog: Cia koj qhib nplooj ntawv web tam sim no hauv txhua qhov browser koj tau teeb tsa ntawm koj lub Mac. Yog tias koj puas tau mus saib lub vev xaib uas tsis ua haujlwm raug nrog Safari, siv cov lus txib no kom nrawm nrawm rau tib lub vev xaib hauv lwm tus browser.
- User Agent: Tus neeg siv tus neeg sawv cev yog ib txoj hlua ntawm cov ntawv uas browser xa mus rau lub webserver hosting lub vev xaib. Yog tias koj twb tau mus xyuas nplooj ntawv web uas tshaj tawm tias Safari tsis tau txais kev txhawb nqa, qhov no yog li cas lub vev xaib paub tias koj siv browser dab tsi. Feem ntau, tsis txaus siab yog tsis muaj tseeb, thiab siv cov ntawv qhia zaub mov no, koj tuaj yeem hloov tus neeg siv tus neeg sawv cev los ua ib qho los ntawm lwm qhov browser. Tej zaum koj yuav xav tsis thoob thaum muaj pes tsawg lub vev xaib uas tsis ua haujlwm tam sim ntawd, tsuas yog hloov tus neeg siv tus neeg sawv cev.
- Empty Caches: Safari khaws cov cache ntawm cov chaw nkag tsis ntev los no. Cov ntaub ntawv khaws cia hauv qhov cache no suav nrog tag nrho cov ntsiab lus ntawm nplooj ntawv, uas tuaj yeem siv los ua lub vev xaib sai sai thaum koj rov qab mus rau nplooj ntawv. Qee lub sij hawm lub cache tuaj yeem qub los yog ua tsis ncaj, ua rau lub vev xaib los tso saib tsis raug. Tshem tawm cov cache tuaj yeem kho cov teeb meem no thiab tuaj yeem pab ua kom Safari sai.
Ntxiv cov ntawv qhia tsim kho ntxiv
Feem ntau ntawm cov ntawv qhia zaub mov seem feem ntau yuav muaj txiaj ntsig zoo rau cov neeg tsim khoom hauv lub vev xaib, tab sis yog tias koj xav paub yuav ua li cas lub vev xaib tsim, ces cov khoom hauv qab no yuav txaus siab:
- Show Web Inspector: Qhov no qhib qhov Web Inspector nyob hauv qab ntawm nplooj ntawv tam sim no. Nrog Web Inspector, koj tuaj yeem tshuaj xyuas cov ntsiab lus uas tau mus rau hauv kev tsim nplooj ntawv.
- Show Page Source: Qhov no qhia txog HTML code ntawm nplooj ntawv tam sim no.
- Show Page Resources: Qhov no yuav qhib cov Resource Inspector sidebar hauv Web Inspector. Nws muab txoj hauv kev yooj yim los saib seb cov duab twg, cov ntawv sau, cov nplooj ntawv style, thiab lwm yam khoom siv rau ntawm nplooj ntawv tam sim no.
- Start Timeline Recording: Yog tias koj xav pom cov nplooj ntawv web loads thiab khiav li cas, sim qhov Start Timeline Recording kev xaiv. Qhov no tsim ib daim duab qhia txog kev ua haujlwm hauv network thiab yuav ua li cas txhua lub vev xaib raug thauj khoom thiab siv. Nws ua rau ib qho kev nthuav qhia, tab sis tsis txhob hnov qab tua qhov tshwj xeeb los ntawm kev xaiv Stop Timeline Recording Txwv tsis pub, koj siv koj Mac cov peev txheej ntawm cov haujlwm tsis tsim txiaj-tshwj tsis yog koj yog lub vev xaib tus tsim tawm.
- Nkag mus rau Kev Tsim Qauv: Lwm lub cuab yeej rau cov neeg tsim khoom hauv lub vev xaib yog lub simulator built-in uas tso cai rau koj saib ua ntej li cas koj lub vev xaib yuav saib cov kev daws teeb meem sib txawv lossis nrog cov khoom sib txawv, xws li iPad lossis iPhone. Tsuas yog thauj cov nplooj ntawv koj xav tau thiab xaiv Enter Responsive Design Mode los saib ua ntej nplooj ntawv. Koj tuaj yeem sim cov nplooj ntawv rendering siv ntau yam khoom siv lossis xaiv qhov kev daws teeb meem los siv. Thaum koj ua tiav, rov qab mus rau Kev Tsim Kho cov ntawv qhia zaub mov thiab xaiv Tawm Cov Qauv Tsim Qauv
- Experimental Features: Yog tias koj muaj siab tawv, koj tuaj yeem sim qee yam ntawm cov yam ntxwv uas yuav pom lawv txoj hauv kev mus rau yav tom ntej versions ntawm Safari browser.
Nrog rau Kev Txhim Kho cov ntawv qhia pom, siv sijhawm qee lub sijhawm los sim ntau yam khoom noj. Tej zaum koj yuav xaus nrog qee qhov kev nyiam uas koj yuav siv ntau zaus.