Speed up websites: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
mNo edit summary
Line 3: Line 3:
Compression tools to reduce the file size of images
Compression tools to reduce the file size of images
* [https://tinypng.com/ TinyPNG – Compress WebP, PNG and JPEG images intelligently]
* [https://tinypng.com/ TinyPNG – Compress WebP, PNG and JPEG images intelligently]
* Or using [https://imagemagick.org/index.php ImageMagick] to batch compress image files <ref>[https://stackoverflow.com/questions/27267073/imagemagick-lossless-max-compression-for-png ImageMagick: Lossless max compression for PNG? - Stack Overflow]</ref>


== JavaScript part ==
== JavaScript part ==

Revision as of 13:43, 19 September 2024

Image part

Compression tools to reduce the file size of images

JavaScript part

Compression tools to reduce the file size of javascript

Using CDN (Content Delivery Network)

//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>
	


Web site design and development process


Connection test

網路服務連線測試