|
|
| (6 intermediate revisions by the same user not shown) |
| Line 79: |
Line 79: |
|
| |
|
| JSON validator | | JSON validator |
| | * {{Gd}} [https://jsonformatter.curiousconcept.com/ JSON Formatter & Validator] 會標示語法錯誤的地方 {{access | date = 2024-05-15}} |
| * [http://jsonlint.com/ JSONLint - The JSON Validator] {{access | date = 2015-09-08}} | | * [http://jsonlint.com/ JSONLint - The JSON Validator] {{access | date = 2015-09-08}} |
| | * [https://jsonviewer.stack.hu/ Online JSON Viewer and Formatter] 語法錯誤只會顯示錯誤訊息「JSON error: Invalid JSON variable」{{access | date = 2024-05-15}} |
|
| |
|
| JSON viewer 通常也包含 validator 功能 | | JSON viewer 通常也包含 validator 功能 |
| Line 138: |
Line 140: |
| *# <span style="color: #999;">沒有標示某節點下的資料筆數</span> | | *# <span style="color: #999;">沒有標示某節點下的資料筆數</span> |
| *# 會將編碼後的中文還原成可讀 | | *# 會將編碼後的中文還原成可讀 |
| | |
| | Other tools |
| | * [https://www.planetoid.info/tools/convert_javascript_array_to_php_array/ Convert JavaScript Array to PHP Array] |
|
| |
|
| Editor plugins | | Editor plugins |
| Line 144: |
Line 149: |
|
| |
|
| == Performance issue: compression tools, using CDN == | | == Performance issue: compression tools, using CDN == |
| Compression tools to reduce the file size of javascript
| | [[Speed up websites#JavaScript part]] |
| * [http://jscompress.com/ Minify Javascript Online / Online JavaScript Packer]<ref>[https://www.minwt.com/webdesign-dev/html/18639.html JSCompress線上JS壓縮器,一鍵將多隻JS合併並壓縮|梅問題.教學網]</ref>
| |
| * [https://packagecontrol.io/packages/YUI%20Compressor Sublime Text 2 YUI-Compressor plugin]
| |
| * ''$'' [https://www.jetbrains.com/phpstorm/ PhpStorm IDE] [https://www.jetbrains.com/help/phpstorm/2017.1/minifying-javascript.html Minifying JavaScript]
| |
| | |
| Using CDN ([https://en.wikipedia.org/wiki/Content_delivery_network Content Delivery Network])
| |
| * [https://developers.google.com/speed/libraries/devguide?hl=zh-tw Google Hosted Libraries - Developer's Guide - Make the Web Faster — Google Developers]<ref>[http://blog.longwin.com.tw/2008/11/google-cdn-host-ajax-library-jquery-2008/ 使用 Google CDN Host 的 Javascript Library - jQuery - Tsung's Blog], [http://stackoverflow.com/questions/5206666/jquery-ui-how-to-use-google-cdn javascript - jquery ui - how to use google CDN - Stack Overflow]</ref>
| |
| * [http://www.asp.net/ajaxlibrary/cdn.ashx Microsoft Ajax Content Delivery Network - ASP.NET Ajax Library]
| |
| * [http://cdnjs.com/ cdnjs.com - the missing cdn for javascript and css] & 中文版: [http://zh-tw.cdnjs.com/ cdnjs.com - 遺失的CDN的JavaScript和CSS] {{access | date = 2014-09-10}}
| |
| * [https://unpkg.com/#/ UNPKG] {{access | date = 2018-10-18}}
| |
| | |
| <pre>
| |
| //If the javascript library hosted at CDN was failed to connect, it will switch to local javascript file automatically.
| |
| | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" type="text/javascript"></script>
| |
| <script>!window.jQuery && document.write('<script src="local-js-path/jquery-1.12.4.min.js"><\/script>');</script>
| |
| | |
| <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js" type="text/javascript"></script>
| |
| <script>!window.jQuery.ui && document.write('<script src="local-js-path/jquery-ui-effects.custom-1.9.2.min.js"><\/script>');</script>
| |
|
| |
| </pre>
| |
|
| |
|
| == troubleshooting steps == | | == troubleshooting steps == |
| Line 180: |
Line 165: |
| more on [[Javascript debug]] | | more on [[Javascript debug]] |
|
| |
|
| == references == | | == References == |
| <references/> | | <references/> |
| | |
| | == Further reading == |
| | # [http://technet.microsoft.com/library/ee198686.aspx Microsoft - Scripting Guidelines] |
| | |
|
| |
|
| [[Category:Programming]] | | [[Category:Programming]] |
| [[Category:Web_Dev]] | | [[Category:Web_Dev]] |
| [[Category:Javascript]] | | [[Category:Javascript]] |
| [[Category:WebDesign]] | | [[Category:Design]] |
| | |
| further reading
| |
| # [http://technet.microsoft.com/library/ee198686.aspx Microsoft - Scripting Guidelines]
| |