开发者

How to clean a DotNetNuke page for viewing on a mobile device?

开发者 https://www.devze.com 2023-03-23 12:55 出处:网络
I\'ve been asked to make a开发者_如何转开发 landing page in DotNetNuke 5 for smartphone users who scan a QR code. I\'m comfortable making mobile-optimized HTML, but what I can\'t figure out is how to

I've been asked to make a开发者_如何转开发 landing page in DotNetNuke 5 for smartphone users who scan a QR code. I'm comfortable making mobile-optimized HTML, but what I can't figure out is how to remove the dozens of little JavaScript files DotNetNuke insists on splattering all over my page.

Here's my skin file:

<%@ Control Language="VB" Codebehind="~/admin/Skins/skin.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
<div id="ContentPane" runat="server" />

Somehow this generates ten <script> tags inside the body tag alone. Even if these files are 1k, they're going to slow down the iPhones and Androids that will hit the page over a 3G connection.

How can I get rid of stuff like this?

<script src="/WebResource.axd?d=ZqXqDXDKumeQiG8GZ0x_mzZZ0jQMPgecqAb7TxBPgb6GZEdhNEOACHbMv_-DjQSx6FMWwSwTCVOkBTdp0&amp;t=634390613877902798" type="text/javascript"></script>
<script src="/js/dnncore.js" type="text/javascript"></script>
<script src="/WebResource.axd?d=OY9wp5yXYij5t96ul3j-usYb-39eRGfAvw_wEQs0x7yQkcbu_mJ6hC130al2esCXmkgk0yjNpDCTD4bw0&amp;t=634390613877902798" type="text/javascript"></script>
<script src="/js/dnn.js" type="text/javascript"></script>
<script src="/js/dnn.xml.js" type="text/javascript"></script>


Unfortunately, at the moment there isn't anything built into DNN that will let you remove most of those scripts (though some of the WebResource.axd scripts may depend on which controls you have being displayed, or which control panel you're using).

I think your best bet is probably to use the Snapsis Page Blaster product, which is made to optimize the output from DNN. By default, it combines and minifies scripts and CSS files. It also has filtering capabilities which you should be able to use to remove those scripts altogether.

So far as CSS is concerned, you can also use the StyleHelper skin object which allows you to specify which CSS files should not be loaded by DNN.

0

精彩评论

暂无评论...
验证码 换一张
取 消