HTML script tag type All In One
HTML script tag type all in one
script type
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
JavaScript MIME types
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#JavaScript_types
在浏览器继续解析页面之前,将立即获取并执行没有 async,defer或type =“ module”属性的脚本以及内联脚本。
<script src="app.js"></script>
<script type="module" src="main.js"></script>
<script nomodule src="fallback.js"></script>
<!-- Generated by the server -->
<script id="data" type="application/json">{"userId":1234,"userName":"John Doe","memberSince":"2000-01-01T00:00:00.000Z"}</script>
<!-- Static -->
<script>
const userInfo = JSON.parse(document.getElementById("data").text);
console.log("User information: %o", userInfo);
</script>
该脚本应该以 text/javascript MIME类型提供,但是浏览器比较宽松,只有在脚本以图像类型(image / *)提供的情况下,浏览器才会阻止它们。视频类型(视频/ *);音频(音频/ *)类型;或text / csv。
如果脚本被阻止,则错误会发送到元素,如果未发送,则会发送加载事件。
demo
https://cdn.xgqfrms.xyz/js-script/index.html
对于 normal 脚本,如果存在 async属性,则将在解析时并行获取经典脚本并对其进行评估。
对于 module 脚本,如果存在 async属性,则脚本及其所有依赖项将在延迟队列中执行,因此将在解析时并行获取它们并对其进行执行。
defer 属性,可以消除阻止解析器的 JavaScript,在这种情况下,浏览器必须在继续解析之前加载和执行脚本。
设置 defer 属性是为了向浏览器指示脚本应在文档解析后但在触发 DOMContentLoaded之前执行。
具有 defer 属性的脚本将阻止 DOMContentLoaded 事件触发,直到 defer 脚本加载并执行完成为止。
type="text/javascript" (defualt)
<script src="main.js"></script>
<script type="text/javascript" src="main.js"></script>
type="module"
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
<script src="app.js"></script>
<script type="module" src="main.js"></script>
type="other/types"
<script type="other/types" src="main.js">
//不会处理, 被忽略
</script>
任何其他值:嵌入的内容被视为浏览器不会处理的数据块。
开发人员必须使用不是 JavaScript MIME类型的有效MIME类型来表示数据块。
src属性将被忽略。
async
对于经典脚本,如果存在 async属性,则将在解析时并行获取经典脚本并对其进行执行。
对于模块脚本,如果存在 async属性,则脚本及其所有依赖项将在延迟队列中执行,因此将在解析时并行获取它们并对其进行执行。
通过此属性,可以消除阻止解析器的JavaScript,在这种情况下,浏览器必须在继续解析之前加载和执行脚本。在这种情况下,延迟具有类似的效果。
这是一个布尔属性:元素上存在布尔属性表示真实值,而缺少属性则表示错误值。
<script src="app.js" async></script>
https://developer.mozilla.org/en-US/docs/Games/Techniques/Async_scripts
defer
设置此布尔值属性是为了向浏览器指示脚本应在文档解析后但在触发 DOMContentLoaded之前执行。
具有defer属性的脚本将阻止 DOMContentLoaded事件触发,直到脚本加载并完成执行为止。
如果缺少 src属性(即对于内联脚本),则不得使用此属性,在这种情况下,它将无效。
defer 属性对模块脚本没有影响-默认情况下会延迟。
具有 defer属性的脚本将按照它们在文档中出现的顺序执行
通过此属性,可以消除阻止解析器的JavaScript,在这种情况下,浏览器必须在继续解析之前加载和执行脚本。
在这种情况下,异步具有类似的效果。
<script src="app.js" defer></script>
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
crossorigin
对于不通过标准 CORS检查的脚本,普通脚本元素会将最少的信息传递给 window.onerror。
要允许对使用单独域的静态媒体进行站点的错误记录,请使用此属性。
请参阅 CORS设置属性,以更有效地说明其有效参数。
https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent
window.onerror = function(message, source, lineno, colno, error) {
// ...
};
window.addEventListener('error', function(event) {
// ...
});
https://developer.mozilla.org/en-US/docs/Glossary/CORS
https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes
<script
src="https://cdn.xgqfrms.xyz/app.js"
integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
crossorigin="anonymous">
</script>
nomodule
https://hacks.mozilla.org/2015/08/es6-in-depth-modules/
设置此布尔属性是为了指示该脚本不应在支持ES2015模块的浏览器中执行-实际上,该属性可用于向不支持模块化 JavaScript代码的旧版浏览器提供后备脚本。
referrerpolicy
no-referrer
no-referrer-when-downgrade(default)
origin
origin-when-cross-origin
strict-origin
strict-origin-when-cross-origin
same-origin
unsafe-ur
no-referrer: The Referer header will not be sent.
no-referrer-when-downgrade (default): The Referer header will not be sent to origins without TLS (HTTPS).
origin: The sent referrer will be limited to the origin of the referring page: its scheme, host, and port.
origin-when-cross-origin: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.
same-origin: A referrer will be sent for same origin, but cross-origin requests will contain no referrer information.
strict-origin: Only send the origin of the document as the referrer when the protocol security level stays the same (e.g. HTTPS→HTTPS), but don't send it to a less secure destination (e.g. HTTPS→HTTP).
strict-origin-when-cross-origin: Send a full URL when performing a same-origin request, but only send the origin when the protocol security level stays the same (e.g.HTTPS→HTTPS), and send no header to a less secure destination (e.g. HTTPS→HTTP).
unsafe-url: The referrer will include the origin and the path (but not the fragment, password, or username). This value is unsafe, because it leaks origins and paths from TLS-protected resources to insecure origins.
https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer
nonce
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src
integrity
SRI
此属性包含内联元数据,用户代理可使用该内联元数据来验证是否已交付提取的资源而没有意外的操作
请参阅子资源完整性
https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
<script
src="https://cdn.xgqfrms.xyz/app.js"
integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
crossorigin="anonymous">
</script>
script type=""application/ld+json"
JSON-LD
application/ld+json
https://www.cnblogs.com/xgqfrms/p/13828485.html
https://www.cnblogs.com/xgqfrms/p/13828485.html
script nonce
<script nonce="">
window.__INITIAL_STATE__ = {"optimist":[],"featureSwitch":{"config":{"2fa_multikey_management_enabled":{"value":false},"account_country_setting_countries_whitelist":{"value":["ad","ae","af","ag","ai","al","am","ao","ar","as","at","au","aw","ax","az","ba","bb","bd","be","bf","bg","bh","bi","bj","bl","bm","bn","bo","bq","br","bs","bt","bv","bw","by","bz","ca","cc","cd","cf","cg","ch","ci","ck","cl","cm","co","cr","cu","cv","cw","cx","cy","cz","de","dj","dk","dm","do","dz","ec","ee","eg","er","es","et","fi","fj","fk","fm","fo","fr","ga","gb","gd","ge","gf","gg","gh","gi","gl","gm","gn","gp","gq","gr","gs","gt","gu","gw","gy","hk","hn","hr","ht","hu","id","ie","il","im","in","io","iq","ir","is","it","je","jm","jo","jp","ke","kg","kh","ki","km","kn","kr","kw","ky","kz","la","lb","lc","li","lk","lr","ls","lt","lu","lv","ly","ma","mc","md","me","mf","mg","mh","mk","ml","mn","mo","mp","mq","mr","ms","mt","mu","mv","mw","mx","my","mz","na","nc","ne","nf","ng","ni","nl","no","np","nr","nu","nz","om","pa","pe","pf","pg","ph","pk","pl","pm","pn","pr","ps","pt","pw","py","qa","re","ro","rs","ru","rw","sa","sb","sc","se","sg","sh","si","sk","sl","sm","sn","so","sr","st","sv","sx","sz","tc","td","tf","tg","th","tj","tk","tl","tm","tn","to","tr","tt","tv","tw","tz","ua","ug","us","uy","uz","va","vc","ve","vi","vn","vu","wf","ws","xk","ye","yt","za","zm","zw"]},"author_moderated_replies_urt_container_enabled":{"value":false},"content_language_setting_enabled":{"value":true},"conversation_controls_flexible_participation_enabled":{"value":false},"conversation_controls_flexible_participation_reply_enabled":{"value":false},"conversation_controls_limited_replies_consumption_configuration":{"value":"no_reply"},"conversation_controls_limited_replies_creation_enabled":{"value":true},"conversation_controls_notifying_participants_enabled":{"value":true},"conversational_safety_ouch_enabled":{"value":false},"dm_reactions_config_active_reactions":{"value":["😂:funny","😲:surprised","😢:sad","❤:like","🔥:excited","👍:agree","👎:disagree"]},"dm_reactions_config_inactive_reactions":{"value":["😠:angry","😷:mask"]},"dm_voice_rendering_enabled":{"value":true},"employee_role":{"value":false},"explore_grouped_trends_and_events_10300":{"value":"subtle"},"guest_broadcasting_timeline_decorations_enabled":{"value":true},"hashflags_animation_like_button_enabled":{"value":true},"hashflags_animation_lottie_default_enabled":{"value":false},"home_timeline_latest_timeline_autoswitch_half_life_minutes":{"value":43200},"home_timeline_latest_timeline_autoswitch_threshold_multiplier":{"value":2},"home_timeline_latest_timeline_max_time_to_autoswitch_minutes":{"value":5256000},"home_timeline_latest_timeline_min_time_to_autoswitch_minutes":{"value":5256000},"home_timeline_latest_timeline_switch_enabled":{"value":true},"home_timeline_latest_timeline_threshold_to_increase_autoswitch_seconds":{"value":60},"home_timeline_spheres_copy_variant":{"value":"list_follow"},"home_timeline_spheres_custom_banner_image_reads_enabled":{"value":true},"home_timeline_spheres_detail_page_muting_enabled":{"value":true},"home_timeline_spheres_list_cell_thumbnail_enabled":{"value":true},"home_timeline_spheres_max_user_owned_or_subscribed_lists_count":{"value":5},"home_timeline_spheres_ranking_mode_control_enabled":{"value":true},"identity_verification_intake_enabled":{"value":false},"list_management_page_urt_timeline_enabled":{"value":false},"live_event_docking_enabled":{"value":true},"live_event_multi_video_auto_advance_dock_enabled":{"value":true},"live_event_multi_video_auto_advance_enabled":{"value":true},"live_event_multi_video_auto_advance_fullscreen_enabled":{"value":false},"live_event_multi_video_auto_advance_transition_duration_seconds":{"value":5},"live_event_multi_video_enabled":{"value":true},"live_event_timeline_default_refresh_rate_interval_seconds":{"value":30},"live_event_timeline_minimum_refresh_rate_interval_seconds":{"value":10},"live_event_timeline_server_controlled_refresh_rate_enabled":{"value":true},"livepipeline_client_enabled":{"value":true},"livepipeline_dm_features_enabled":{"value":true},"livepipeline_tweetengagement_enabled":{"value":true},"moment_annotations_enabled":{"value":true},"network_layer_503_backoff_mode":{"value":"host"},"project_friday_enabled":{"value":false},"responsive_web_alt_svc":{"value":false},"responsive_web_alt_text_badge_enabled":{"value":false},"responsive_web_api_transition_enabled":{"value":true},"responsive_web_auto_logout_multiaccount_enabled":{"value":true},"responsive_web_auto_logout_restrictedauthtoken_enabled":{"value":true},"responsive_web_auto_logout_twid_enabled":{"value":true},"responsive_web_birdwatch_consumption_enabled":{"value":false},"responsive_web_birdwatch_contribution_enabled":{"value":false},"responsive_web_birdwatch_hcomp_user":{"value":false},"responsive_web_branch_cpid_enabled":{"value":true},"responsive_web_branch_sdk_enabled":{"value":true},"responsive_web_card_preload_mode":{"value":"prerender"},"responsive_web_check_browser_support_enabled":{"value":true},"responsive_web_cleanup_macaw_swift_indexed_db":{"value":true},"responsive_web_continue_as_always_enabled":{"value":false},"responsive_web_continue_as_param_enabled":{"value":true},"responsive_web_conversation_tree_enabled":{"value":false},"responsive_web_conversation_tree_toggle":{"value":false},"responsive_web_csrf_clientside_enabled":{"value":true},"responsive_web_dcm_2_enabled":{"value":true},"responsive_web_dm_health_inbox_request_cell_social_proof_enabled":{"value":false},"responsive_web_dm_quick_access_enabled":{"value":true},"responsive_web_dm_quick_access_no_empty_drawer_enabled":{"value":true},"responsive_web_dm_quick_access_with_close_enabled":{"value":false},"responsive_web_eu_compliance_double_click_disabled":{"value":false},"responsive_web_eu_compliance_ga_disabled":{"value":false},"responsive_web_eu_compliance_player_card_disabled":{"value":false},"responsive_web_eu_compliance_sentry_disabled":{"value":false},"responsive_web_eu_countries":{"value":["at","be","bg","ch","cy","cz","de","dk","ee","es","fi","fr","gb","gr","hr","hu","ie","is","it","li","lt","lu","lv","mt","nl","no","pl","pt","ro","se","si","sk"]},"responsive_web_events_page_horizon_video_enabled":{"value":false},"responsive_web_extension_compatibility_hide":{"value":true},"responsive_web_extension_compatibility_impression_guard":{"value":true},"responsive_web_extension_compatibility_override_param":{"value":true},"responsive_web_extension_compatibility_scribe":{"value":true},"responsive_web_extension_compatibility_size_threshold":{"value":50},"responsive_web_fake_root_twitter_domain_for_testing":{"value":false},"responsive_web_fetch_hashflags_on_boot":{"value":true},"responsive_web_fleets_dm_consumption_enabled":{"value":false},"responsive_web_fleets_viewer_screen_enabled":{"value":false},"responsive_web_framerate_tracking_home_enabled":{"value":false},"responsive_web_graphql_amr_timeline":{"value":false},"responsive_web_graphql_bookmarks":{"value":false},"responsive_web_graphql_conversations_enabled":{"value":false},"responsive_web_graphql_dark_reads_probability":{"value":0},"responsive_web_graphql_liked_by":{"value":false},"responsive_web_graphql_likes_timeline":{"value":false},"responsive_web_graphql_list_crud":{"value":true},"responsive_web_graphql_list_management_timelines_enabled":{"value":true},"responsive_web_graphql_list_members_subscribers_enabled":{"value":true},"responsive_web_graphql_list_operations":{"value":true},"responsive_web_graphql_redux_module_users":{"value":false},"responsive_web_graphql_retweeted_by":{"value":false},"responsive_web_graphql_rux_landing_enabled":{"value":false},"responsive_web_graphql_tweet_results":{"value":false},"responsive_web_graphql_user_by_rest_id":{"value":false},"responsive_web_graphql_user_profile_screen":{"value":false},"responsive_web_graphql_user_results":{"value":false},"responsive_web_graphql_users_by_rest_ids":{"value":false},"responsive_web_graphql_verify_credentials_enabled":{"value":true},"responsive_web_guest_token_reporting":{"value":true},"responsive_web_hoisting_anchor_invalidation_enabled":{"value":false},"responsive_web_horizon_video_player_enabled":{"value":true},"responsive_web_hover_on_mousemove_enabled":{"value":false},"responsive_web_html_archive_renderer_enabled":{"value":true},"responsive_web_inline_login_box_enabled":{"value":true},"responsive_web_inline_reply_enabled":{"value":false},"responsive_web_inline_reply_with_fab_enabled":{"value":false},"responsive_web_instream_video_redesign_enabled":{"value":false},"responsive_web_list_hover_cards_enabled":{"value":true},"responsive_web_live_video_parity_periscope_auth_enabled":{"value":false},"responsive_web_login_input_type_email_enabled":{"value":false},"responsive_web_login_signup_sheet_app_install_cta_enabled":{"value":true},"responsive_web_media_upload_limit_2g":{"value":250},"responsive_web_media_upload_limit_3g":{"value":1500},"responsive_web_media_upload_limit_slow_2g":{"value":150},"responsive_web_media_upload_md5_hashing_enabled":{"value":false},"responsive_web_media_upload_target_jpg_pixels_per_byte":{"value":1},"responsive_web_menu_section_divider_enabled":{"value":false},"responsive_web_moment_maker_annotations_enabled":{"value":false},"responsive_web_moment_maker_enabled":{"value":false},"responsive_web_multiple_account_limit":{"value":5},"responsive_web_mute_unmute_toast_with_user_screen_name_enabled":{"value":false},"responsive_web_new_client_events_enabled":{"value":false},"responsive_web_not_my_account_screen_enabled":{"value":true},"responsive_web_ntab_verified_mentions_vit_internal_dogfood":{"value":false},"responsive_web_ocf_sms_autoverify_enabled":{"value":false},"responsive_web_prerolls_fullscreen_disabled_on_ios":{"value":false},"responsive_web_promoted_tweet_param_append_enabled":{"value":true},"responsive_web_promoted_tweet_url_rewrite_enabled":{"value":false},"responsive_web_quick_promote_enabled":{"value":false},"responsive_web_redirect_to_app_enabled":{"value":false},"responsive_web_report_page_not_found":{"value":false},"responsive_web_rich_tweet_landing_enabled":{"value":true},"responsive_web_scroller_autopoll_enabled":{"value":false},"responsive_web_scroller_v3_enabled":{"value":true},"responsive_web_search_dms_enabled":{"value":true},"responsive_web_second_degree_replies_nudge_force_enabled":{"value":false},"responsive_web_second_degree_replies_nudge_get_enabled":{"value":false},"responsive_web_second_degree_replies_nudge_show_enabled":{"value":false},"responsive_web_segmented_control_v2_enabled":{"value":false},"responsive_web_serviceworker_safari_disabled":{"value":false},"responsive_web_settings_revamp_enabled":{"value":true},"responsive_web_settings_timeline_refresh_background_interval":{"value":0},"responsive_web_settings_timeline_refresh_enabled":{"value":false},"responsive_web_settings_timeline_refresh_instant_default":{"value":true},"responsive_web_sports_carousel":{"value":true},"responsive_web_trends_setting_new_endpoints":{"value":true},"responsive_web_trigger_test_backoff_on_bookmark":{"value":false},"responsive_web_tweets_pill_local_enabled":{"value":true},"responsive_web_unsupported_entry_tombstone":{"value":false},"responsive_web_use_app_prompt_copy_variant":{"value":"prompt_better"},"responsive_web_use_app_prompt_enabled":{"value":true},"responsive_web_verification_v2_enabled":{"value":true},"responsive_web_video_native_fullscreen_enabled":{"value":true},"responsive_web_video_pcomplete_enabled":{"value":true},"responsive_web_video_promoted_logging_enabled":{"value":true},"responsive_web_vod_muted_captions_enabled":{"value":true},"responsive_web_vs_config_desktop_assumed_item_height":{"value":100},"responsive_web_vs_config_resize_observer_enabled":{"value":true},"responsive_web_zipkin_api_requests_enabled":{"value":false},"responsive_web_zipkin_api_requests_paths_allowlist":{"value":["/2/timeline/home.json"]},"scribe_api_error_sample_size":{"value":0},"scribe_api_sample_size":{"value":100},"scribe_cdn_host_list":{"value":["si0.twimg.com","si1.twimg.com","si2.twimg.com","si3.twimg.com","a0.twimg.com","a1.twimg.com","a2.twimg.com","a3.twimg.com","abs.twimg.com","amp.twimg.com","o.twimg.com","pbs.twimg.com","pbs-eb.twimg.com","pbs-ec.twimg.com","pbs-v6.twimg.com","pbs-h1.twimg.com","pbs-h2.twimg.com","video.twimg.com","platform.twitter.com","cdn.api.twitter.com","ton.twimg.com","v.cdn.vine.co","mtc.cdn.vine.co","edge.vncdn.co","mid.vncdn.co"]},"scribe_cdn_sample_size":{"value":50},"search_channels_description_enabled":{"value":true},"search_channels_discovery_page_enabled":{"value":false},"search_features_deep_link_request_params_enabled":{"value":true},"soft_interventions_retweet_nudge_enabled":{"value":false},"topic_landing_page_enabled":{"value":true},"topic_landing_page_share_enabled":{"value":true},"topics_discovery_page_enabled":{"value":false},"topics_new_social_context_bottom_border_enabled":{"value":false},"topics_new_social_context_enabled":{"value":false},"topics_new_social_context_icon_color_enabled":{"value":false},"topics_peek_home_enabled":{"value":false},"topics_peek_search_enabled":{"value":false},"traffic_rewrite_map":{"value":[]},"tweet_limited_actions_config_enabled":{"value":true},"tweet_limited_actions_config_non_compliant":{"value":["reply","retweet","like","send_via_dm","add_to_bookmarks","add_to_moment","pin_to_profile","view_tweet_activity","share_tweet_via"]},"unified_cards_cta_color_blue_cta":{"value":true},"user_display_name_max_limit":{"value":50},"voice_consumption_enabled":{"value":false},"web_video_bitrate_persistence_enabled":{"value":false},"web_video_hls_android_mse_enabled":{"value":true},"web_video_hls_mp4_threshold_sec":{"value":0},"web_video_hlsjs_version":{"value":""},"responsive_web_video_precaching_8507":{"value":"precaching"}},"debug":{},"impression_pointers":{},"impressions":{},"featureSetToken":"f1d054fbb385a7820275246e9e6202298249080f","isLoaded":true,"isLoading":false,"keysRead":{},"settingsVersion":"383c0d2ab4bf640739bb146b44437b78"},"toasts":[],"entities":{"users":{"entities":{"2532728959":{"blocked_by":false,"blocking":false,"can_dm":true,"can_media_tag":true,"created_at":"2014-05-29T14:02:30.000Z","default_profile":false,"default_profile_image":false,"description":"xgqfrms 하광건 Front End Architect","entities":{"description":{"urls":[]},"url":{"urls":[{"display_url":"xgqfrms.xyz","expanded_url":"https://www.xgqfrms.xyz","url":"https://t.co/Gi2chicPsx","indices":[0,23]}]}},"fast_followers_count":0,"favourites_count":490,"follow_request_sent":false,"followed_by":false,"followers_count":27,"following":false,"friends_count":34,"has_custom_timelines":true,"is_translator":false,"listed_count":3,"location":"Shanghai","media_count":151,"muting":false,"name":"xgqfrms_하광건","normal_followers_count":27,"notifications":false,"pinned_tweet_ids_str":[],"profile_banner_url":"https://pbs.twimg.com/profile_banners/2532728959/1401374381","profile_image_url_https":"https://pbs.twimg.com/profile_images/659977938318852096/udoTC3R4_normal.jpg","profile_interstitial_type":"","protected":false,"screen_name":"xgqfrms","statuses_count":522,"translator_type":"none","url":"https://t.co/Gi2chicPsx","verified":false,"want_retweets":false,"id_str":"2532728959","is_profile_translatable":false,"birthdate":{"day":1,"month":1,"year":1997,"visibility":"mutualfollow","year_visibility":"self"},"features":{"mediatool_studio_library":false},"profile_banner_extensions_media_color":{"palette":[{"percentage":34.23,"rgb":{"blue":17,"green":16,"red":12}},{"percentage":29.76,"rgb":{"blue":36,"green":35,"red":179}},{"percentage":16.79,"rgb":{"blue":173,"green":190,"red":208}},{"percentage":4.61,"rgb":{"blue":13,"green":11,"red":97}},{"percentage":2.2,"rgb":{"blue":40,"green":32,"red":23}}]},"profile_image_extensions_media_color":{"palette":[{"percentage":42.94,"rgb":{"blue":79,"green":48,"red":4}},{"percentage":22.16,"rgb":{"blue":167,"green":225,"red":249}},{"percentage":18.13,"rgb":{"blue":158,"green":148,"red":111}},{"percentage":9.2,"rgb":{"blue":33,"green":26,"red":217}},{"percentage":2.29,"rgb":{"blue":56,"green":42,"red":159}}]}}},"errors":{},"fetchStatus":{"2532728959":"loaded"}},"tweets":{"entities":{},"errors":{},"fetchStatus":{}},"cards":{"entities":{},"errors":{},"fetchStatus":{}}},"session":{"country":"SG","emailLiteLoginEligibility":{"fetchStatus":"none"},"guestId":"159819059602746218","language":"en","oneFactorLoginEligibility":{"fetchStatus":"none"},"user_id":"2532728959"},"typeaheadUsers":{"fetchStatus":"none","users":{},"denylist":{},"lastUpdated":0,"index":{}},"settings":{"local":{"nextPushCheckin":0,"shouldAutoPlayGif":false,"scale":"normal","themeColor":"blue","highContrastEnabled":false,"themeBackground":"light","loginPromptLastShown":0,"reducedMotionEnabled":false,"conversationTreeEnabled":false,"showTweetMediaDetailDrawer":true},"remote":{"settings":{"display_sensitive_media":false,"time_zone":{"name":"Beijing","utc_offset":28800,"tzinfo_name":"Asia/Shanghai"},"protected":false,"screen_name":"xgqfrms","always_use_https":true,"use_cookie_personalization":true,"sleep_time":{"enabled":false,"end_time":null,"start_time":null},"geo_enabled":false,"language":"en","discoverable_by_email":false,"discoverable_by_mobile_phone":false,"personalized_trends":false,"allow_media_tagging":"following","allow_contributor_request":"following","allow_ads_personalization":false,"allow_logged_out_device_personalization":true,"allow_location_history_personalization":true,"allow_sharing_data_for_third_party_personalization":false,"allow_dms_from":"following","allow_dm_groups_from":"following","translator_type":"none","trend_location":[{"name":"New York","countryCode":"US","url":"http://where.yahooapis.com/v1/place/2459115","woeid":2459115,"placeType":{"name":"Town","code":7},"parentid":23424977,"country":"United States"}],"country_code":"us","nsfw_user":false,"nsfw_admin":false,"ranked_timeline_setting":1,"ranked_timeline_eligible":true,"address_book_live_sync_enabled":false,"universal_quality_filtering_enabled":"enabled","dm_receipt_setting":"all_enabled","alt_text_compose_enabled":false,"mention_filter":"following","allow_authenticated_periscope_requests":true,"protect_password_reset":false,"require_password_login":false,"requires_login_verification":true,"dm_quality_filter":"enabled","autoplay_disabled":false,"settings_metadata":{}},"fetchStatus":"loaded"},"dataSaver":{"dataSaverMode":false},"transient":{"dtabBarInfo":{"dtabAll":null,"dtabRweb":null,"hide":false},"loginPromptShown":false,"lastViewedDmInboxPath":"/messages","themeFocus":""}},"devices":{"browserPush":{"fetchStatus":"none","pushNotificationsPrompt":{"dismissed":false,"fetchStatus":"none"},"subscribed":false,"supported":null},"devices":{"data":{"emails":[],"phone_numbers":[]},"fetchStatus":"none"},"notificationSettings":{"push_settings":{"error":null,"fetchStatus":"none"},"push_settings_template":{"template":{"settings":[]}},"sms_settings":{"error":null,"fetchStatus":"none"},"sms_settings_template":{"template":{"settings":[]}},"checkin_time":null}},"hashflags":{"fetchStatus":"none","hashflags":{}},"urt":{}};
window.__META_DATA__ = {"env":"prod","isFromDynamicRenderer":false,"isLoggedIn":true,"isRTL":false,"hasMultiAccountCookie":false,"uaParserTags":["m2","rweb","msw"],"serverDate":1602785034437,"sha":"6219bbd1e607d7c11cc98d0e1743c9ca09da57a0"};
</script>
live demo
refs
https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/script
prefetch / preload / prerender
dns-prefetch / preconnect
https://www.cnblogs.com/xgqfrms/p/8984852.html
©xgqfrms 2012-2020
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/13823860.html
未经授权禁止转载,违者必究!